Sha256: d079fcadf599cd38a471889d43f8e21b74ff6666d2e1829fa7331de48da12339
Contents?: true
Size: 975 Bytes
Versions: 2
Compression:
Stored size: 975 Bytes
Contents
require 'spec_helper' describe 'Organization Add User' do context 'when the user and organization exist' do use_vcr_cassette "organization add user" it 'responds with an empty success' do response = board.user_organizations.create(:user_id => 1, :organization_id => 3) response.should be_true end end context 'when the user does not exist' do use_vcr_cassette "organization add user - user does not exist" it 'raises a not found error' do expect { board.user_organizations.create(:user_id => 100_000, :organization_id => 1) }.to raise_error(Board::Client::NotFound) end end context 'when the organization does not exist' do use_vcr_cassette "organization add user - organization does not exist" it 'raises a not found error' do expect { board.user_organizations.create(:user_id => 1, :organization_id => 100_000) }.to raise_error(Board::Client::NotFound) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
board-client-0.99.1 | spec/integration/organizations/add_user_spec.rb |
board-client-0.99.0 | spec/integration/organizations/add_user_spec.rb |