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
|
2016-07-17 15:16:27 +00:00
|
|
|
last_response.body.include?("score invalid").should be true
|
2013-10-16 16:20:37 +00:00
|
|
|
end
|
|
|
|
|
end
|