forked from cypress-io/cypress-test-tiny
-
-
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.
reproducable test case for cypress-io/cypress#1315
- Loading branch information
Showing
3 changed files
with
22 additions
and
44 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,24 @@ | ||
describe('CORS + 301 redirect', () => { | ||
it('works', () => { | ||
it('redirects to foo', () => { | ||
return fetch('http://localhost:3000', { | ||
headers: { | ||
'x-foo': 'foo' | ||
'x-redirect-to': 'foo' | ||
} | ||
}) | ||
.then(response => response.text()) | ||
.then(result => { | ||
expect(result).to.equal('ok') | ||
expect(result).to.equal('foo') | ||
}) | ||
|
||
.catch(error => { | ||
debugger | ||
throw error | ||
}) | ||
it('redirects to bar', () => { | ||
return fetch('http://localhost:3000', { | ||
headers: { | ||
'x-redirect-to': 'bar' | ||
} | ||
}) | ||
.then(response => response.text()) | ||
.then(result => { | ||
expect(result).to.equal('bar') | ||
}) | ||
}) | ||
}) |
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