forked from radiant/radiant
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcontent_negotiation.feature
More file actions
24 lines (21 loc) · 1.5 KB
/
content_negotiation.feature
File metadata and controls
24 lines (21 loc) · 1.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Feature: Proper content negotiation
In order to have a more rich and flexible editing and browsing experience
a content editor
wants to access the admin section with multiple content formats
Scenario: Default to HTML format
Given I am logged in as "admin"
When I send an "Accept" header of "image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-ms-application, application/vnd.ms-xpsdocument, application/xaml+xml, application/x-ms-xbap, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*"
And I go to the "pages" admin page
Then I should not see "Missing template"
Scenario: Requesting XML format via file-extension
Given I am logged in as "admin"
When I send an "Accept" header of "image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-ms-application, application/vnd.ms-xpsdocument, application/xaml+xml, application/x-ms-xbap, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*"
And I go to the "pages" admin page as xml
Then I should see an xml document
Scenario: Requesting children via Ajax
Given I am logged in as "admin"
When I send an "Accept" header of "text/javascript, text/html, application/xml, text/xml, */*"
And I send an "X-Requested-With" header of "XMLHttpRequest"
And I request the children of page "home"
Then I should not see "Radiant CMS"
And I should see "<tr>" tags in the page source