Skip to content

Commit

Permalink
test(server): use example.com as test domain name
Browse files Browse the repository at this point in the history
  • Loading branch information
Hans Kristian Flaatten committed Jun 6, 2016
1 parent 24f9b16 commit a02ebfd
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions test/integration/cors.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ describe('cors', () => {

it('accepts request from known domain', done => {
app.get('/')
.set('Origin', 'https://foo.com')
.set('Origin', 'https://example1.com')
.expect(200)
.expect('Access-Control-Allow-Origin', 'https://foo.com')
.expect('Access-Control-Allow-Origin', 'https://example1.com')
.expect('Access-Control-Allow-Methods', 'GET, OPTIONS')
.expect('Access-Control-Expose-Headers', 'x-response-time')
.expect('Access-Control-Allow-Max-Age', '0')
Expand Down
6 changes: 3 additions & 3 deletions test/integration/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const albumId = process.env.FOTOWEB_ALBUM_ID;
describe('server', () => {
it('index', done => {
app.get('/')
.set('Origin', 'https://foo.com')
.set('Origin', 'https://example1.com')
.expect(200)
.expect((res) => {
assert(/v1\/albums$/.test(res.body.v1.albums_url));
Expand All @@ -25,7 +25,7 @@ describe('server', () => {
const url = '/v1/albums/';

app.get(url)
.set('Origin', 'https://foo.com')
.set('Origin', 'https://example1.com')
.expect(200)
.end((err, res) => {
assert.ifError(err);
Expand Down Expand Up @@ -119,7 +119,7 @@ describe('server', () => {
const url = `/v1/albums/${albumId}/photos`;

app.get(url)
.set('Origin', 'https://foo.com')
.set('Origin', 'https://example1.com')
.expect(200)
.end((err, res) => {
assert.ifError(err);
Expand Down
4 changes: 2 additions & 2 deletions test/support/env.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

process.env.NODE_ENV = 'test';
process.env.CORS_REQUIRE_ORIGIN = 'true';
process.env.CORS_ALLOW_ORIGINS = 'foo.com,bar.com';
process.env.CORS_ALLOW_ORIGINS = 'example1.com,example2.com';
process.env.CORS_EXPOSE_HEADERS = 'x-response-time';
process.env.CORS_REQUIRE_ORIGIN = 'true';

0 comments on commit a02ebfd

Please sign in to comment.