Skip to content

Commit 7e0981e

Browse files
style: fix Rubocop's Layout/LineLength offenses
1 parent 6c632d2 commit 7e0981e

File tree

2 files changed

+18
-4
lines changed

2 files changed

+18
-4
lines changed

spec/webauthn/authenticator_assertion_response_spec.rb

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -539,19 +539,31 @@
539539

540540
context "when authenticator_data contains FIDO AppID hash instead of rp_id hash" do
541541
before do
542-
allow(assertion_response.authenticator_data).to receive(:rp_id_hash).and_return(OpenSSL::Digest::SHA256.digest(app_id))
542+
allow(assertion_response.authenticator_data)
543+
.to receive(:rp_id_hash)
544+
.and_return(OpenSSL::Digest::SHA256.digest(app_id))
543545
end
544546

545547
context "and FIDO AppID is given as rp_id" do
546548
it "verifies" do
547549
expect(
548-
assertion_response.verify(original_challenge, public_key: credential_public_key, sign_count: 0, rp_id: app_id)
550+
assertion_response.verify(
551+
original_challenge,
552+
public_key: credential_public_key,
553+
sign_count: 0,
554+
rp_id: app_id
555+
)
549556
).to be_truthy
550557
end
551558

552559
it "is valid" do
553560
expect(
554-
assertion_response.valid?(original_challenge, public_key: credential_public_key, sign_count: 0, rp_id: app_id)
561+
assertion_response.valid?(
562+
original_challenge,
563+
public_key: credential_public_key,
564+
sign_count: 0,
565+
rp_id: app_id
566+
)
555567
).to be_truthy
556568
end
557569
end

spec/webauthn/public_key_credential_with_assertion_spec.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,9 @@
287287
before do
288288
WebAuthn.configuration.legacy_u2f_appid = legacy_u2f_appid
289289

290-
allow(assertion_response.authenticator_data).to receive(:rp_id_hash).and_return(OpenSSL::Digest::SHA256.digest(legacy_u2f_appid))
290+
allow(assertion_response.authenticator_data)
291+
.to receive(:rp_id_hash)
292+
.and_return(OpenSSL::Digest::SHA256.digest(legacy_u2f_appid))
291293
end
292294

293295
it "works" do

0 commit comments

Comments
 (0)