-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat!: renames User class and other function argument names (#154)
- Loading branch information
Showing
3 changed files
with
13 additions
and
13 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
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 |
---|---|---|
|
@@ -7,8 +7,8 @@ | |
|
||
Dotenv.load('.env') | ||
|
||
# This is a test suite for the Passage User API using the Test::Unit framework. | ||
class TestUserAPI < Test::Unit::TestCase | ||
# This is a test suite for the Passage User using the Test::Unit framework. | ||
class TestUser < Test::Unit::TestCase | ||
PassageClient = Passage::Client.new(app_id: ENV['APP_ID'], api_key: ENV['API_KEY']) | ||
|
||
def setup | ||
|
@@ -45,7 +45,7 @@ def test_get_user_by_identifier | |
user = PassageClient.user.get(user_id: @test_user.id) | ||
assert_equal @test_user.id, user.id | ||
|
||
user_by_identifier = PassageClient.user.get_by_identifier(user_identifier: @test_user.email) | ||
user_by_identifier = PassageClient.user.get_by_identifier(identifier: @test_user.email) | ||
assert_equal @test_user.id, user_by_identifier.id | ||
|
||
assert_equal user, user_by_identifier | ||
|
@@ -55,7 +55,7 @@ def test_get_user_by_identifier_upper_case | |
user = PassageClient.user.get(user_id: @test_user.id) | ||
assert_equal @test_user.id, user.id | ||
|
||
user_by_identifier = PassageClient.user.get_by_identifier(user_identifier: @test_user.email.upcase) | ||
user_by_identifier = PassageClient.user.get_by_identifier(identifier: @test_user.email.upcase) | ||
assert_equal @test_user.id, user_by_identifier.id | ||
|
||
assert_equal user, user_by_identifier | ||
|
@@ -70,7 +70,7 @@ def test_get_user_by_identifier_phone | |
user = PassageClient.user.get(user_id: create_user.id) | ||
assert_equal create_user.id, user.id | ||
|
||
user_by_identifier = PassageClient.user.get_by_identifier(user_identifier: phone) | ||
user_by_identifier = PassageClient.user.get_by_identifier(identifier: phone) | ||
assert_equal create_user.id, user_by_identifier.id | ||
|
||
assert_equal user, user_by_identifier | ||
|
@@ -81,7 +81,7 @@ def test_invalid_get_by_identifier | |
assert_equal @test_user.id, user.id | ||
|
||
assert_raise Passage::PassageError do | ||
PassageClient.user.get_by_identifier(user_identifier: '[email protected]') | ||
PassageClient.user.get_by_identifier(identifier: '[email protected]') | ||
end | ||
end | ||
|
||
|