Skip to content

Instantly share code, notes, and snippets.

@brianhsu
Created April 8, 2018 01:48
Show Gist options
  • Save brianhsu/aa046b33375dfdfb66258836ae6f930b to your computer and use it in GitHub Desktop.
Save brianhsu/aa046b33375dfdfb66258836ae6f930b to your computer and use it in GitHub Desktop.
建立使用者的單元測試,Pending 版
class CreateUserSpec extends fixture.WordSpec with Matchers with OptionValues {
"CreateUser" when {
"validate request" should {
"return an exception if email is empty" in { fixture =>
pending
}
"return an exception if email is effectively empty" in { fixture =>
pending
}
"return an exception if email is malformed" in { fixture =>
pending
}
"return an exception if name is empty" in { fixture =>
pending
}
"return an exception if name is effectively empty" in { fixture =>
pending
}
"return an exception if email is duplicate" in { fixture =>
pending
}
"return None when everything is validated" in { fixture =>
pending
}
}
"generate journal" should {
"return correct journal object" in { fixture =>
pending
}
}
"execute the operation" should {
"have correct uuid, name, email and set createTime / updateTime to current time" in { fixture =>
pending
}
"call DAO object to save" in { fixture =>
pending
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment