Sha256: 328b8482bb951340af1264f5ffe10999eb166c65ad5d580a1c2dbbd4e1e9bc8b
Contents?: true
Size: 900 Bytes
Versions: 3
Compression:
Stored size: 900 Bytes
Contents
require_relative './../spec_helper' module VzaarApi describe 'Playlist: Lookup' do let(:described_class) { Playlist } let(:id) { api_envs['playlist_id'] } context 'when user is authenticated' do before { setup_for :account_owner } context 'and resource can be found' do subject { described_class.find(id) } specify { expect(subject.id).to eq id } end context 'and resource cannot be found' do it 'raises an error' do expect{ described_class.find(-1) }.to raise_error( Error, 'Not found: Resource cannot be found') end end end context 'when user is not authenticated' do before { setup_for :intruder } it 'raises an error' do expect{ described_class.find(id) }.to raise_error( Error, 'Authentication failed: Invalid credentials') end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
vzaar_api-2.0.2 | examples/playlist/lookup_spec.rb |
vzaar_api-2.0.1 | examples/playlist/lookup_spec.rb |
vzaar_api-2.0.0 | examples/playlist/lookup_spec.rb |