Guest User

Untitled

a guest
Nov 20th, 2018
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. [Subject(typeof(GilliamRegistrationHandler))]
  2. public class email_already_known : with_handler_and_views_and_container<object, GilliamRegistrationHandler>
  3. {
  4. Establish context = () =>
  5. {
  6. store.store_document(new User(new ClaimSet("test",
  7. Guid.NewGuid().AsClaim(ClaimType.NameIdentifier),
  8. "bob@mortimer.com".AsClaim(ClaimType.Email)), new GilliamConfig()));
  9.  
  10. store.wait();
  11. };
  12.  
  13. Because of = () => post("register", new GilliamRegistrationCommand()
  14. {
  15. Password = "Password1",
  16. ConfirmPassword = "Password1",
  17. Email = "bob@mortimer.com"
  18. });
  19.  
  20. It is_not_ok = () => is_400();
  21.  
  22.  
  23. It does_not_store_pending_registration = () => store.load_document<PendingRegistration>("PendingRegistrations/1").ShouldBeNull();
  24. }
Add Comment
Please, Sign In to add comment