1
0
Fork 0
mirror of https://github.com/thoughtbot/capybara-webkit synced 2023-03-27 23:22:28 -04:00

visit no longer tries to fix invalid URLs

This commit is contained in:
Pete Gieser 2012-01-11 17:44:35 -05:00 committed by Matthew Mongeau
parent 5adab74465
commit fccb444816
2 changed files with 4 additions and 4 deletions

View file

@ -223,9 +223,9 @@ describe Capybara::Driver::Webkit do
subject.current_url.should == "http://127.0.0.1:#{port}/hello/world?success=true"
end
it "escapes URLs" do
subject.visit("/hello there")
subject.current_url.should =~ /hello%20there/
it "does not double-encode URLs" do
subject.visit("/hello/world?success=%25true")
subject.current_url.should =~ /success=\%25true/
end
it "visits a page with an anchor" do

View file

@ -7,7 +7,7 @@ Visit::Visit(WebPage *page, QObject *parent) : Command(page, parent) {
}
void Visit::start(QStringList &arguments) {
QUrl requestedUrl = QUrl(arguments[0]);
QUrl requestedUrl = QUrl::fromEncoded(arguments[0].toUtf8(), QUrl::StrictMode);
page()->currentFrame()->load(QUrl(requestedUrl));
}