Skip to content

Commit 1640731

Browse files
committed
Update UT with new methods
1 parent d3311de commit 1640731

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

Test/AccountUser/accountUser_test.rb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,19 +35,19 @@ def test_AccountUser_create_user
3535
def test_AccountUser_All_auth
3636
params = {"url_api" => 'http://api.test.sw.com.mx', "url" => 'http://services.test.sw.com.mx', "user" => ENV["SDKTEST_USER"], "password" => ENV["SDKTEST_PASSWORD"]}
3737
AccountUser::set(params)
38-
response = AccountUser::getUser_all
38+
response = AccountUser::get_users
3939
assert(response.get_status == "success")
4040
assert(response.get_data != "")
4141
end
4242

4343
def test_AccountUser_by_id
4444
params = {"url_api" => 'http://api.test.sw.com.mx', "token" => ENV["SDKTEST_TOKEN"]}
4545
AccountUser::set(params)
46-
idUser = "32501CF2-DC62-4370-B47D-25024C44E131"
47-
response = AccountUser::getUser_by_IdUser(idUser)
46+
response = AccountUser::get_users(IdUser: "32501CF2-DC62-4370-B47D-25024C44E131")
4847
assert(response.get_status == "success")
4948
assert(response.get_data != "")
5049
data = response.get_data
50+
puts "Consulta por ID"
5151
data.items.each do |user|
5252
puts "ID: #{user.idUser}, Nombre: #{user.name}, RFC: #{user.taxId}, Email: #{user.email}, Stamps: #{user.stamps}, token: #{user.accessToken}"
5353
end
@@ -56,25 +56,25 @@ def test_AccountUser_by_id
5656
def test_AccountUser_by_email
5757
params = {"url_api" => 'http://api.test.sw.com.mx', "token" => ENV["SDKTEST_TOKEN"]}
5858
AccountUser::set(params)
59-
email = "userRuby_#{ENV['SDKTEST_USER']}"
60-
response = AccountUser::getUser_by_email(email)
59+
response = AccountUser::get_users(Email: "userRuby_#{ENV['SDKTEST_USER']}")
6160
assert(response.get_status == "success")
6261
assert(response.get_data != "")
62+
data = response.get_data
6363
end
6464

6565
def test_AccountUser_by_taxId
6666
params = {"url_api" => 'http://api.test.sw.com.mx', "token" => ENV["SDKTEST_TOKEN"]}
6767
AccountUser::set(params)
6868
taxId = "AAAA000101010"
69-
response = AccountUser::getUser_by_taxId(taxId)
69+
response = AccountUser::get_users(TaxId:"AAAA000101010" )
7070
assert(response.get_status == "success")
7171
assert(response.get_data != "")
7272
end
7373

7474
def test_AccountUser_by_isActive
7575
params = {"url_api" => 'http://api.test.sw.com.mx', "token" => ENV["SDKTEST_TOKEN"]}
7676
AccountUser::set(params)
77-
response = AccountUser::getUser_by_isActive(true)
77+
response = AccountUser::get_users(IsActive: true)
7878
assert(response.get_status == "success")
7979
assert(response.get_data != "")
8080
end

0 commit comments

Comments
 (0)