forked from openaustralia/planningalerts
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Redirect requests to root of api.planningalerts.org.au
- Loading branch information
Showing
3 changed files
with
22 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
require 'spec_helper' | ||
|
||
describe "redirects" do | ||
describe "api redirects" do | ||
it "should not redirect the normal home page on the normal subdomain" do | ||
get "http://www.planningalerts.org.au" | ||
response.should_not be_redirect | ||
end | ||
|
||
describe "requests on the api subdomain" do | ||
it "to the home page should redirect" do | ||
get "http://api.planningalerts.org.au" | ||
response.should redirect_to "http://www.planningalerts.org.au" | ||
end | ||
end | ||
end | ||
end |