Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added another stipulation to the https get test on rails session. Add…
…ed a test for the link object with 2 simple tests. 2nd was done while looking for a bug
- Loading branch information
mike.gaffney
committed
Oct 22, 2008
1 parent
2fd734f
commit f3d508b
Showing
3 changed files
with
28 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,6 @@ coverage | |
pkg | ||
doc | ||
ri | ||
email.txt | ||
email.txt | ||
.project | ||
.loadpath |
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,23 @@ | ||
require File.expand_path(File.dirname(__FILE__) + "/../../spec_helper") | ||
|
||
describe Webrat::Link do | ||
# include Webrat::Link | ||
|
||
before do | ||
@session = mock(Webrat::TestSession) | ||
end | ||
|
||
it "should pass through relative urls" do | ||
link = Webrat::Link.new(@session, {"href" => "/path"}) | ||
@session.should_receive(:request_page).with("/path", :get, {}) | ||
link.click | ||
end | ||
|
||
it "shouldnt put base url onto " do | ||
url = "https://www.example.com/path" | ||
@session.should_receive(:request_page).with(url, :get, {}) | ||
link = Webrat::Link.new(@session, {"href" => url}) | ||
link.click | ||
end | ||
|
||
end |
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