-
Notifications
You must be signed in to change notification settings - Fork 5
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
f403ca2
commit cde02fb
Showing
2 changed files
with
12 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -198,7 +198,8 @@ class MyDummyClass < Ravelin::RavelinObject | |
authentication_mechanism: { | ||
password: { | ||
password: 'super-secret-password', | ||
success: true | ||
success: true, | ||
emailPassword: '[email protected]', | ||
} | ||
} | ||
} | ||
|
@@ -237,7 +238,9 @@ class MyDummyClass < Ravelin::RavelinObject | |
'authenticationMechanism' => { | ||
'password' => { | ||
'passwordHashed' => '5c76fcf4400da3b4804d70b91af20703d483f2c5860cc2f8d59592a1da8d2121', | ||
'success' => true | ||
'success' => true, | ||
'emailPasswordSHA256' => '60b980431585b5ec81dffba0dc11cf44b583d8925924af5f71d756404ef2e0a7', | ||
'passwordSHA1SHA256' => '8f8db8a623009b56dc4ed8c47ede9d6a72d7569dcdfcedd6c1b7a3f441719f67', | ||
} | ||
}, | ||
'customerId' => '123', | ||
|
@@ -268,6 +271,7 @@ class MyDummyClass < Ravelin::RavelinObject | |
authentication_mechanism: { | ||
password: { | ||
password: 'super-secret-password', | ||
emailPassword: '[email protected]', | ||
success: true | ||
} | ||
} | ||
|
@@ -303,13 +307,16 @@ class MyDummyClass < Ravelin::RavelinObject | |
timestamp: 1586283630 | ||
).serializable_hash | ||
|
||
puts output | ||
expect(output).to eq( | ||
{ | ||
"login" => { | ||
"authenticationMechanism" => { | ||
"password" => { | ||
"passwordHashed" => "5c76fcf4400da3b4804d70b91af20703d483f2c5860cc2f8d59592a1da8d2121", | ||
"success" => true | ||
"success" => true, | ||
'emailPasswordSHA256' => '60b980431585b5ec81dffba0dc11cf44b583d8925924af5f71d756404ef2e0a7', | ||
'passwordSHA1SHA256' => '8f8db8a623009b56dc4ed8c47ede9d6a72d7569dcdfcedd6c1b7a3f441719f67', | ||
} | ||
}, | ||
"customerId" => "123", | ||
|
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 |
---|---|---|
|
@@ -25,8 +25,8 @@ | |
context 'creates instance with valid params' do | ||
it { expect { subject }.to_not raise_exception } | ||
|
||
it { expect(subject.authentication_mechanism.password.emailPasswordSHA256).to eq(Digest::SHA256.hexdigest("[email protected]")) } | ||
it { expect(subject.authentication_mechanism.password.passwordSHA1SHA256).to eq(Digest::SHA256.hexdigest(Digest::SHA1.hexdigest('lol'))) } | ||
it { expect(subject.authentication_mechanism.password.emailPasswordSHA256).to eq('53437119eca797b8110d9299142f7b123aa011ef6676905ce30bbc887cec7efc') } | ||
it { expect(subject.authentication_mechanism.password.passwordSHA1SHA256).to eq('539424f5201711772633efc0ccbaefa3e946e666bf4cc6a7a7ff0451826ba824') } | ||
end | ||
|
||
context 'creates an authentication_mechanism object' do | ||
|