-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7c7985c
commit 4566e48
Showing
3 changed files
with
14 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -514,7 +514,7 @@ defmodule Core.Services.UsersTest do | |
end | ||
end | ||
|
||
describe "#bootstrap_users/2" do | ||
describe "#bootstrap_user/2" do | ||
test "it will create new users and set login method" do | ||
{:ok, user} = Users.bootstrap_user(:google, %{email: "[email protected]", name: "New User"}) | ||
|
||
|
@@ -532,11 +532,19 @@ defmodule Core.Services.UsersTest do | |
assert upd.login_method == :google | ||
end | ||
|
||
test "it will not allow logins w/o login method set" do | ||
test "it will not allow logins w/o correct login method set" do | ||
user = insert(:user) | ||
|
||
{:error, _} = Users.bootstrap_user(:google, %{email: user.email}) | ||
end | ||
|
||
test "it will allow sso logins w/ whatever login method set" do | ||
user = insert(:user) | ||
|
||
{:ok, upd} = Users.bootstrap_user(:sso, %{email: user.email}) | ||
|
||
assert upd.id == user.id | ||
end | ||
end | ||
|
||
describe "#create_trust_relationship" do | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,7 +50,7 @@ defmodule GraphQl.UserMutationTest do | |
end | ||
|
||
test "it will fail on invalid captchas" do | ||
{:ok, user} = Users.create_user(%{ | ||
{:ok, _} = Users.create_user(%{ | ||
name: "Michael Guarino", | ||
email: "[email protected]", | ||
password: "super strong password" | ||
|