Advertisement
Guest User

Untitled

a guest
Feb 26th, 2016
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. diff --git a/test/basic_auth_plug_test.exs b/test/basic_auth_plug_test.exs
  2. new file mode 100644
  3. index 0000000..6153cb5
  4. --- /dev/null
  5. +++ b/test/basic_auth_plug_test.exs
  6. @@ -0,0 +1,15 @@
  7. +defmodule BasicAuthExercise.BasicAuthPlugTest do
  8. + use ExUnit.Case
  9. +
  10. + test "not passing :username raises an error" do
  11. + assert_raise KeyError, fn ->
  12. + BasicAuth.init(password: "secret")
  13. + end
  14. + end
  15. +
  16. + test "not passing :password raises an error" do
  17. + assert_raise KeyError, fn ->
  18. + BasicAuth.init(username: "user")
  19. + end
  20. + end
  21. +end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement