fix rspec tests

This commit is contained in:
Brian Smith 2013-01-27 22:41:53 -05:00
parent 5073ee9d94
commit a84fb46edd
3 changed files with 4 additions and 12 deletions

View File

@ -4,12 +4,6 @@
context.JK = context.JK || {};
context.JK.SessionList = function(app) {
var CATEGORY = {
INVITATION : {index: 0, id: "#sessions-invitations"},
FRIENDS : {index: 1, id: "#sessions-friends"},
OTHER : {index: 2, id: "#sessions-other"}
};
var LATENCY = {
GOOD : {description: "GOOD", min: 0.0, max: 100.0},
MEDIUM : {description: "MEDIUM", min: 100.0, max: 200.0},

View File

@ -78,7 +78,6 @@ describe "Music Session API ", :type => :api do
session_history[0]["description"].should == music_session["description"]
get '/api/users/' + user.id + '/session_history/' + music_session["id"] + '/users.json'
#puts last_response.body
# test Track-specific APIs
get "/api/sessions/#{music_session["id"]}/tracks.json", "CONTENT_TYPE" => 'application/json'
@ -341,7 +340,7 @@ describe "Music Session API ", :type => :api do
participant = music_session["participants"][0]
participant["ip_address"].should == client.ip_address
participant["client_id"].should == client.client_id
participant["user_id"].should == user.id
participant.user["user_id"].should == user.id
end
it "can see invitation_id associatied with hidden session" do
@ -375,7 +374,7 @@ describe "Music Session API ", :type => :api do
participant["client_id"].should == client.client_id
# and see the user_id because they are friends
participant["user_id"].should == user.id
participant["user"]["id"].should == user.id
end
it "can't join closed music session with no invitation" do

View File

@ -16,7 +16,7 @@ describe "Search API", :type => :api do
it "empty search" do
get '/api/search.json'
last_response.status.should == 200
JSON.parse(last_response.body).should eql(JSON.parse('{"fans" : [], "musicians" : [], "bands": [], "recordings" : []}'))
JSON.parse(last_response.body).should eql(JSON.parse('{}'))
end
it "simple search" do
@ -43,8 +43,7 @@ describe "Search API", :type => :api do
bands.should include(@band.id)
bands.should include(@band2.id)
response["recordings"].length.should == 0
recording = response["recordings"][0]
response["recordings"].should == nil
end
end
end