fix test for /repo/{repo.id}/crons endpoint

This commit is contained in:
Lennard Wolf 2015-11-09 16:25:03 +01:00
parent 0e1b266e9b
commit b1408583dd

View File

@ -43,4 +43,17 @@ describe Travis::API::V3::Services::Crons::Find do
}} }}
end end
describe "fetching crons from private repo, not authenticated" do
before { repo.update_attribute(:private, true) }
before { get("/v3/repo/#{repo.id}/crons") }
after { repo.update_attribute(:private, false) }
example { expect(last_response).to be_not_found }
example { expect(parsed_body).to be == {
"@type" => "error",
"error_type" => "not_found",
"error_message" => "repository not found (or insufficient access)",
"resource_type" => "repository"
}}
end
end end