projects
/
feedcatcher.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
2ef6906
)
Made format_spec more exacting
author
Neil Smith
<neil.git@njae.me.uk>
Tue, 7 Jan 2014 23:52:49 +0000
(23:52 +0000)
committer
Neil Smith
<neil.git@njae.me.uk>
Tue, 7 Jan 2014 23:52:49 +0000
(23:52 +0000)
spec/requests/format_spec.rb
patch
|
blob
|
history
diff --git
a/spec/requests/format_spec.rb
b/spec/requests/format_spec.rb
index 216cc3923d47918b77db0583a3c708ce0da3c296..93330d6a4299000f4f8257119c7698256c0e9881 100644
(file)
--- a/
spec/requests/format_spec.rb
+++ b/
spec/requests/format_spec.rb
@@
-5,51
+5,61
@@
describe "format" do
it "serves index as html by default" do
get_via_redirect '/index'
expect(response.header['Content-Type']).to include('text/html')
it "serves index as html by default" do
get_via_redirect '/index'
expect(response.header['Content-Type']).to include('text/html')
+ expect(response.header['Content-Type']).not_to include('application/rss+xml')
end
it "serves index.html as html" do
get_via_redirect '/index.html'
expect(response.header['Content-Type']).to include('text/html')
end
it "serves index.html as html" do
get_via_redirect '/index.html'
expect(response.header['Content-Type']).to include('text/html')
+ expect(response.header['Content-Type']).not_to include('application/rss+xml')
end
it "serves index.rss as rss" do
get_via_redirect '/index.rss'
expect(response.header['Content-Type']).to include('application/rss+xml')
end
it "serves index.rss as rss" do
get_via_redirect '/index.rss'
expect(response.header['Content-Type']).to include('application/rss+xml')
+ expect(response.header['Content-Type']).not_to include('text/html')
end
it "serves index as html with the accept header" do
get_via_redirect '/index', {}, {'Accept' => 'text/html'}
expect(response.header['Content-Type']).to include('text/html')
end
it "serves index as html with the accept header" do
get_via_redirect '/index', {}, {'Accept' => 'text/html'}
expect(response.header['Content-Type']).to include('text/html')
+ expect(response.header['Content-Type']).not_to include('application/rss+xml')
end
it "serves index as rss with the accept header" do
get_via_redirect '/index', {}, {'Accept' => 'application/rss+xml'}
expect(response.header['Content-Type']).to include('application/rss+xml')
end
it "serves index as rss with the accept header" do
get_via_redirect '/index', {}, {'Accept' => 'application/rss+xml'}
expect(response.header['Content-Type']).to include('application/rss+xml')
+ expect(response.header['Content-Type']).not_to include('text/html')
end
it "serves feed as html by default" do
get_via_redirect '/other_test_feed'
expect(response.header['Content-Type']).to include('text/html')
end
it "serves feed as html by default" do
get_via_redirect '/other_test_feed'
expect(response.header['Content-Type']).to include('text/html')
+ expect(response.header['Content-Type']).not_to include('application/rss+xml')
end
it "serves feed.html as html" do
get_via_redirect '/other_test_feed.html'
expect(response.header['Content-Type']).to include('text/html')
end
it "serves feed.html as html" do
get_via_redirect '/other_test_feed.html'
expect(response.header['Content-Type']).to include('text/html')
+ expect(response.header['Content-Type']).not_to include('application/rss+xml')
end
it "serves feed.rss as rss" do
get_via_redirect '/other_test_feed.rss'
expect(response.header['Content-Type']).to include('application/rss+xml')
end
it "serves feed.rss as rss" do
get_via_redirect '/other_test_feed.rss'
expect(response.header['Content-Type']).to include('application/rss+xml')
+ expect(response.header['Content-Type']).not_to include('text/html')
end
it "serves feed as html with the accept header" do
get_via_redirect '/other_test_feed', {}, {'Accept' => 'text/html'}
expect(response.header['Content-Type']).to include('text/html')
end
it "serves feed as html with the accept header" do
get_via_redirect '/other_test_feed', {}, {'Accept' => 'text/html'}
expect(response.header['Content-Type']).to include('text/html')
+ expect(response.header['Content-Type']).not_to include('application/rss+xml')
end
it "serves feed as rss with the accept header" do
get_via_redirect '/other_test_feed', {}, {'Accept' => 'application/rss+xml'}
expect(response.header['Content-Type']).to include('application/rss+xml')
end
it "serves feed as rss with the accept header" do
get_via_redirect '/other_test_feed', {}, {'Accept' => 'application/rss+xml'}
expect(response.header['Content-Type']).to include('application/rss+xml')
+ expect(response.header['Content-Type']).not_to include('text/html')
end
end
end
end