Skip to content

Commit

Permalink
Added failing test demonstrating inability to request a full uri at a…
Browse files Browse the repository at this point in the history
… different hostname.
  • Loading branch information
bnoguchi committed Jul 1, 2011
1 parent ceff70d commit 973773e
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions test/browser.navigation.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,21 @@ module.exports = {
});
});
},

'test .request(method, foreignUrl)': function(done){
var browser = tobi.createBrowser(app);
browser.request('GET', 'http://www.google.com/', {}, function(res, $){
res.should.have.status(200);
browser.should.not.have.property('path');
browser.history.should.be.empty;

var googBrowser = Browser.browsers['www.google.com']
googBrowser.should.have.property('path', '/');
googBrowser.history.should.eql(['/']);
googBrowser.jQuery('img[alt="Google"]').length.should.equal(1);
done();
});
},

'test .request() redirect': function(done){
var browser = tobi.createBrowser(app);
Expand Down

0 comments on commit 973773e

Please sign in to comment.