public
Last active

interest_spec.rb

  • Download Gist
interest_spec.rb
Ruby
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
require 'services/user'
require 'services/artist'
 
describe 'POST /interests' do
# Use User and Artist Ruby wrappers to call services
let(:user) { Services::User.create(:name => 'Mike Pack') }
let(:artist) { Services::Artist.create(:name => 'Cool Band', :genres => ['Jazz', 'R&B']) }
 
it 'registers a users interest in an artist' do
# Initiate POST request
post '/interests', {
:user_id => user.id,
:artist_id => artist.id
}.to_json
last_response.should be_ok
end
end

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.