Fix Annoation-related specs
Annotations are now blocked by features, so stub the service to return true for the cases we expect to get data back from POST requests
This commit is contained in:
parent
aa2281ebfe
commit
b43568a0f9
|
@ -86,6 +86,8 @@ describe 'Jobs' do
|
|||
describe "POST /jobs/:id/annotations" do
|
||||
context "with valid credentials" do
|
||||
it "responds with a 204" do
|
||||
Travis::Services::UpdateAnnotation.any_instance.stubs(:annotations_enabled?).returns(true)
|
||||
|
||||
annotation_provider = Factory(:annotation_provider)
|
||||
response = post "/jobs/#{job.id}/annotations", { username: annotation_provider.api_username, key: annotation_provider.api_key, status: "passed", description: "Foobar" }, headers
|
||||
response.status.should eq(204)
|
||||
|
|
|
@ -9,6 +9,8 @@ describe Travis::Api::App::Endpoint::Jobs do
|
|||
end
|
||||
|
||||
it "POST /jobs/:id/annotations" do
|
||||
Travis::Services::UpdateAnnotation.any_instance.stubs(:annotations_enabled?).returns(true)
|
||||
|
||||
response = post("/jobs/#{job.id}/annotations", { "username" => provider.api_username, "key" => provider.api_key, "status" => "passed", "description" => "Foobar" }, "HTTP_ACCEPT" => "application/vnd.travis-ci.2+json, */*; q=0.01").should be_successful
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue
Block a user