5 it
"serves index as html by default" do
6 get_via_redirect
'/index'
7 expect(response
.header
['Content-Type']).to
include('text/html')
10 it
"serves index.html as html" do
11 get_via_redirect
'/index.html'
12 expect(response
.header
['Content-Type']).to
include('text/html')
15 it
"serves index.rss as rss" do
16 get_via_redirect
'/index.rss'
17 expect(response
.header
['Content-Type']).to
include('application/rss+xml
')
20 it "serves index as html with the accept header" do
21 get_via_redirect '/index', {}, {'Accept' => 'text/html
'}
22 expect(response.header['Content-Type
']).to include('text
/html
')
25 it "serves index as rss with the accept header" do
26 get_via_redirect '/index', {}, {'Accept' => 'application/rss+xml
'}
27 expect(response.header['Content-Type
']).to include('application
/rss+xml
')
30 it "serves feed as html by default" do
31 get_via_redirect '/other_test_feed
'
32 expect(response.header['Content-Type
']).to include('text
/html
')
35 it "serves feed.html as html" do
36 get_via_redirect '/other_test_feed
.html
'
37 expect(response.header['Content-Type
']).to include('text
/html
')
40 it "serves feed.rss as rss" do
41 get_via_redirect '/other_test_feed
.rss
'
42 expect(response.header['Content-Type
']).to include('application
/rss+xml
')
45 it "serves feed as html with the accept header" do
46 get_via_redirect '/other_test_feed', {}, {'Accept' => 'text/html
'}
47 expect(response.header['Content-Type
']).to include('text
/html
')
50 it "serves feed as rss with the accept header" do
51 get_via_redirect '/other_test_feed', {}, {'Accept' => 'application/rss+xml
'}
52 expect(response.header['Content-Type
']).to include('application
/rss+xml
')