5 it
"serves index as html by default" do
6 get_via_redirect
'/index'
7 expect(response
.header
['Content-Type']).to
include('text/html')
8 expect(response
.header
['Content-Type']).not_to
include('application/rss+xml')
11 it
"serves index.html as html" do
12 get_via_redirect
'/index.html'
13 expect(response
.header
['Content-Type']).to
include('text/html')
14 expect(response
.header
['Content-Type']).not_to
include('application/rss+xml')
17 it
"serves index.rss as rss" do
18 get_via_redirect
'/index.rss'
19 expect(response
.header
['Content-Type']).to
include('application/rss+xml')
20 expect(response
.header
['Content-Type']).not_to
include('text/html')
23 it
"serves index as html with the accept header" do
24 get_via_redirect
'/index', {}, {'Accept' => 'text/html'}
25 expect(response
.header
['Content-Type']).to
include('text/html')
26 expect(response
.header
['Content-Type']).not_to
include('application/rss+xml')
29 it
"serves index as rss with the accept header" do
30 get_via_redirect
'/index', {}, {'Accept' => 'application/rss+xml'}
31 expect(response
.header
['Content-Type']).to
include('application/rss+xml')
32 expect(response
.header
['Content-Type']).not_to
include('text/html')
35 it
"serves feed as html by default" do
36 get_via_redirect
'/other_test_feed'
37 expect(response
.header
['Content-Type']).to
include('text/html')
38 expect(response
.header
['Content-Type']).not_to
include('application/rss+xml')
41 it
"serves feed.html as html" do
42 get_via_redirect
'/other_test_feed.html'
43 expect(response
.header
['Content-Type']).to
include('text/html')
44 expect(response
.header
['Content-Type']).not_to
include('application/rss+xml')
47 it
"serves feed.rss as rss" do
48 get_via_redirect
'/other_test_feed.rss'
49 expect(response
.header
['Content-Type']).to
include('application/rss+xml')
50 expect(response
.header
['Content-Type']).not_to
include('text/html')
53 it
"serves feed as html with the accept header" do
54 get_via_redirect
'/other_test_feed', {}, {'Accept' => 'text/html'}
55 expect(response
.header
['Content-Type']).to
include('text/html')
56 expect(response
.header
['Content-Type']).not_to
include('application/rss+xml')
59 it
"serves feed as rss with the accept header" do
60 get_via_redirect
'/other_test_feed', {}, {'Accept' => 'application/rss+xml'}
61 expect(response
.header
['Content-Type']).to
include('application/rss+xml')
62 expect(response
.header
['Content-Type']).not_to
include('text/html')