forked from hotsh/rstat.us
-
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.
Modify tests so that they are valid whether ENABLE_HTTPS is yes or not
- Loading branch information
1 parent
880183e
commit 2b27a36
Showing
5 changed files
with
28 additions
and
5 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
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 |
---|---|---|
|
@@ -6,13 +6,19 @@ | |
|
||
it "404s if that user doesnt exist" do | ||
get "/users/acct:[email protected]/xrd.xml" | ||
if last_response.status == 301 | ||
follow_redirect! | ||
end | ||
last_response.status.must_equal(404) | ||
end | ||
|
||
it "renders the user's xrd" do | ||
@user = Fabricate(:user) | ||
param = "acct:#{@user.username}@#{@user.author.domain}" | ||
get "/users/#{param}/xrd.xml" | ||
if last_response.status == 301 | ||
follow_redirect! | ||
end | ||
|
||
xml = Nokogiri.XML(last_response.body) | ||
subject = xml.xpath("//xmlns:Subject").first.content | ||
|