Sha256: 7fdf9d882b324b0e9e4cea0b9bc40462c42bf3fe9f64efe40eb3000d4905d1d7
Contents?: true
Size: 1.35 KB
Versions: 3
Compression:
Stored size: 1.35 KB
Contents
require 'spec_helper' describe Auth0::Api::V2::Tickets do before :all do @instance = DummyClass.new.extend(Auth0::Api::V2::Tickets) end context '.post_email_verification' do it { expect(@instance).to respond_to(:post_email_verification) } it 'expect client to send post to /api/v2/tickets/email-verification with body' do expect(@instance).to receive(:post).with('/api/v2/tickets/email-verification', user_id: 'user_id', result_url: nil) expect { @instance.post_email_verification('user_id') }.not_to raise_error end it 'expect client to rasie error when calling with empty body' do expect { @instance.post_email_verification(nil) }.to raise_error( 'Must supply a valid user id to post an email verification' ) end end context '.post_password_change' do it { expect(@instance).to respond_to(:post_password_change) } it 'expect client to send post to /api/v2/tickets/password-change with body' do expect(@instance).to receive(:post).with('/api/v2/tickets/password-change', user_id: nil, result_url: nil, new_password: nil, connection_id: nil, email: nil) expect { @instance.post_password_change }.not_to raise_error end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
auth0-4.5.0 | spec/lib/auth0/api/v2/tickets_spec.rb |
auth0-4.4.0 | spec/lib/auth0/api/v2/tickets_spec.rb |
auth0-4.1.0 | spec/lib/auth0/api/v2/tickets_spec.rb |