Skip to content

Commit 2f32d1f

Browse files
committed
Fix test to use CallbackError instead of DomainVerificationError
Updated the test expectation to match the new error type used in the domain verifier. The test now properly expects CallbackError with :domain_verification_failed symbol."
1 parent 3cf301a commit 2f32d1f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

spec/omniauth/strategies/microsoft_graph_oauth2_spec.rb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,12 @@
282282

283283
context 'when email verification fails' do
284284
let(:response_hash) { { mail: 'something@domain.invalid' } }
285-
let(:error) { OmniAuth::MicrosoftGraph::DomainVerificationError.new }
285+
let(:error) do
286+
OmniAuth::Strategies::OAuth2::CallbackError.new(
287+
:domain_verification_failed,
288+
'Domain verification failed'
289+
)
290+
end
286291

287292
before do
288293
allow(OmniAuth::MicrosoftGraph::DomainVerifier).to receive(:verify!).and_raise(error)

0 commit comments

Comments
 (0)