Skip to content

Commit a4bb0ba

Browse files
test: use be_truthy and be_falsy
1 parent 1c3613b commit a4bb0ba

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

spec/webauthn/authenticator_assertion_response_spec.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939

4040
shared_examples "a valid assertion response" do
4141
it "verifies" do
42-
expect {
42+
expect(
4343
assertion_response.verify(
4444
challenge,
4545
public_key: public_key,
@@ -48,7 +48,7 @@
4848
user_verification: user_verification,
4949
rp_id: rp_id
5050
)
51-
}.not_to raise_error
51+
).to be_truthy
5252
end
5353

5454
it "is valid" do
@@ -61,7 +61,7 @@
6161
user_verification: user_verification,
6262
rp_id: rp_id
6363
)
64-
).to be(true)
64+
).to be_truthy
6565
end
6666
end
6767

@@ -89,7 +89,7 @@
8989
user_verification: user_verification,
9090
rp_id: rp_id
9191
)
92-
).to be(false)
92+
).to be_falsy
9393
end
9494
end
9595

spec/webauthn/authenticator_attestation_response_spec.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,15 @@
3131

3232
shared_examples "a valid attestation response" do
3333
it "verifies" do
34-
expect {
34+
expect(
3535
attestation_response.verify(
3636
challenge,
3737
expected_origin,
3838
user_presence: user_presence,
3939
user_verification: user_verification,
4040
rp_id: rp_id
4141
)
42-
}.not_to raise_error
42+
).to be_truthy
4343
end
4444

4545
it "is valid" do
@@ -51,7 +51,7 @@
5151
user_verification: user_verification,
5252
rp_id: rp_id
5353
)
54-
).to be(true)
54+
).to be_truthy
5555
end
5656
end
5757

@@ -77,7 +77,7 @@
7777
user_verification: user_verification,
7878
rp_id: nil
7979
)
80-
).to be(false)
80+
).to be_falsy
8181
end
8282
end
8383

0 commit comments

Comments
 (0)