scube-server/spec/integration/api/playlists_spec.rb
2014-04-01 10:48:18 +00:00

23 lines
403 B
Ruby

require 'spec_helper'
feature 'API playlists' do
include UserIntegrationHelpers
background do
api_sign_in
end
scenario 'creates playlist' do
playlist = FactoryGirl.attributes_for :playlist
post api_playlists_path,
format: :json,
playlist: playlist
json = JSON response.body
json['id'].should be_a Fixnum
json['name'].should == playlist[:name]
end
end