Add integration specs for Atom feed

These rudimentary specs do not test the correctness of
the Atom feed format.
This commit is contained in:
Hiro Asari 2013-11-11 11:40:37 -05:00
parent 26bdd84ae6
commit 8171d3915e
2 changed files with 16 additions and 0 deletions

View File

@ -95,4 +95,12 @@ describe 'v1 repos' do
get('/svenfuchs/minimal.png?branch=foo,bar').should deliver_result_image_for('passing')
end
end
context 'with "Accept: application/atom+xml" header' do
let(:headers) { { 'HTTP_ACCEPT' => 'application/atom+xml' } }
it 'GET /repositories/svenfuchs/minimal/builds' do
response = get '/repositories/svenfuchs/minimal/builds', {}, headers
response.content_type.should =~ /^application\/atom\+xml/
end
end
end

View File

@ -139,4 +139,12 @@ describe 'Repos' do
result.should deliver_result_image_for('passing')
end
end
context 'with "Accept: application/atom+xml" header' do
let(:headers) { { 'HTTP_ACCEPT' => 'application/atom+xml' } }
it 'GET /repositories/svenfuchs/minimal/builds' do
response = get '/repositories/svenfuchs/minimal/builds', {}, headers
response.content_type.should =~ /^application\/atom\+xml/
end
end
end