Skip to content

Commit

Permalink
remove traces of response.body when the have_xpath stuff runs just fi…
Browse files Browse the repository at this point in the history
…ne against the response object
  • Loading branch information
atmos committed Nov 27, 2008
1 parent 0c515cc commit 75dd480
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions spec/requests/openid/identity_discovery_spec.rb
Expand Up @@ -5,9 +5,9 @@
response = request("/users/quentin", {'HTTP_ACCEPT' => 'application/xrds+xml'})
response.should be_successful
response.headers["X-XRDS-Location"].should == "http://example.org/users/quentin/xrds"
response.body.should have_xpath("//xrd/service[uri='http://example.org/servers']")
response.body.should have_xpath("//xrd/service[type='http://specs.openid.net/auth/2.0/signon']")
response.body.should have_xpath("//xrd/service[type='http://openid.net/sreg/1.0']")
response.should have_xpath("//xrd/service[uri='http://example.org/servers']")
response.should have_xpath("//xrd/service[type='http://specs.openid.net/auth/2.0/signon']")
response.should have_xpath("//xrd/service[type='http://openid.net/sreg/1.0']")
end

it "gracefully handles non-existent user requests(/users/romeo)" do
Expand All @@ -21,9 +21,9 @@
it "renders the user's identity page" do
response = request("/users/quentin")
response.should be_successful
response.body.should have_xpath("//link[@rel='openid.server' and @href='http://example.org/servers']")
response.body.should have_xpath("//meta[@http-equiv='X-XRDS-Location' and @content='http://example.org/users/quentin/xrds']")
response.body.should have_xpath("//body[p='OpenID identity page for quentin']")
response.should have_xpath("//link[@rel='openid.server' and @href='http://example.org/servers']")
response.should have_xpath("//meta[@http-equiv='X-XRDS-Location' and @content='http://example.org/users/quentin/xrds']")
response.should have_xpath("//body[p='OpenID identity page for quentin']")
response.headers["X-XRDS-Location"].should == "http://example.org/users/quentin/xrds"
end
end
Expand Down
4 changes: 2 additions & 2 deletions spec/requests/openid/provider_xrds_spec.rb
Expand Up @@ -3,8 +3,8 @@
it "renders the provider idp page" do
response = request("/servers/xrds", {'HTTP_ACCEPT' => 'application/xrds+xml'})
response.should be_successful
response.body.should have_xpath("//xrd/service[uri='http://example.org/servers']")
response.body.should have_xpath("//xrd/service[type='http://specs.openid.net/auth/2.0/server']")
response.should have_xpath("//xrd/service[uri='http://example.org/servers']")
response.should have_xpath("//xrd/service[type='http://specs.openid.net/auth/2.0/server']")
end
end

Expand Down

0 comments on commit 75dd480

Please sign in to comment.