jam-cloud/web/spec/requests/isp_scores_spec.rb

17 lines
450 B
Ruby
Raw Permalink Normal View History

2013-10-16 16:20:37 +00:00
require 'spec_helper'
describe "Isp Scores", :type => :api do
it "valid score" do
post "/api/users/isp_scoring", { :some_data => 100} .to_json
last_response.status.should == 200
last_response.body.should == "scoring recorded"
end
it "invalid score - not json" do
post "/api/users/isp_scoring", "some data = 100"
last_response.status.should == 422
last_response.body.include?("score invalid").should be true
2013-10-16 16:20:37 +00:00
end
end