Sha256: fe2c02548cc0a1182e1da65990da56db07d262e67e7f099c1e6efa056d8f9fb2
Contents?: true
Size: 682 Bytes
Versions: 2
Compression:
Stored size: 682 Bytes
Contents
# frozen_string_literal: true RSpec.describe RatingChgkV2::Rest::AuthenticationToken do it 'raises 401 for incorrect email and password' do expect do VCR.use_cassette('authentication_token/token_401') do test_client.authentication_token email: 'fake@example.com', password: '123' end end.to raise_error(RatingChgkV2::Error::Unauthorized) end it 'returns token for correct email and password' do token_obj = VCR.use_cassette('authentication_token/token') do test_client.authentication_token email: ENV['CHGK_EMAIL'], password: ENV['CHGK_PASSWORD'] end expect(token_obj.token).to eq('stubbed_token') end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rating-chgk-v2-1.0.0 | spec/lib/rating_chgk_v2/rest/authentication_token_spec.rb |
rating-chgk-v2-1.0.0.rc1 | spec/lib/rating_chgk_v2/rest/authentication_token_spec.rb |