VRFS-1577 fixing specs
This commit is contained in:
parent
5f74bce061
commit
1c6b5b78bb
|
|
@ -656,10 +656,10 @@ describe "Music Session API ", :type => :api do
|
|||
msuh = FactoryGirl.create(:music_session_user_history, :music_session_id => music_session.id, :client_id => client.client_id, :user_id => user.id)
|
||||
msuh.rating.should be_nil
|
||||
login(user)
|
||||
post "/api/participant_histories/#{msuh.id}/rating.json", { :rating => 0 }.to_json, "CONTENT_TYPE" => "application/json"
|
||||
post "/api/participant_histories/#{msuh.client_id}/rating.json", { :rating => 1 }.to_json, "CONTENT_TYPE" => "application/json"
|
||||
last_response.status.should == 200
|
||||
msuh.reload
|
||||
msuh.rating.to_i.should == 0
|
||||
msuh.rating.to_i.should == 1
|
||||
end
|
||||
|
||||
it "track sync" do
|
||||
|
|
|
|||
|
|
@ -160,8 +160,9 @@ describe "User Progression", :type => :api do
|
|||
client = FactoryGirl.create(:connection, :user => user)
|
||||
music_session = FactoryGirl.create(:music_session, :creator => user, :description => "My Session")
|
||||
msuh = FactoryGirl.create(:music_session_user_history, :music_session_id => music_session.id, :client_id => client.client_id, :user_id => user.id)
|
||||
expect(msuh).to_not eq(nil)
|
||||
login(user)
|
||||
post "/api/participant_histories/#{msuh.id}/rating.json", { :rating => 0 }.to_json, "CONTENT_TYPE" => "application/json"
|
||||
post "/api/participant_histories/#{msuh.client_id}/rating.json", { :rating => 1 }.to_json, "CONTENT_TYPE" => "application/json"
|
||||
|
||||
user.reload
|
||||
user.first_good_music_session_at.should_not be_nil
|
||||
|
|
|
|||
Loading…
Reference in New Issue