fix test for /repo/{repo.id}/crons endpoint
This commit is contained in:
parent
0e1b266e9b
commit
b1408583dd
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue
Block a user