scube-server/spec/integration/api/playlists_spec.rb
2012-03-19 02:23:48 +00:00

23 lines
405 B
Ruby

require 'spec_helper'
feature 'API playlists' do
include UserIntegrationHelpers
background do
api_sign_in
end
scenario 'creates playlist' do
playlist = Factory.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