Skip to content
This repository has been archived by the owner on Oct 17, 2022. It is now read-only.

Commit

Permalink
Merge pull request #153 from watson-developer-cloud/terms-of-use
Browse files Browse the repository at this point in the history
feat(Index): add terms of use
  • Loading branch information
jeff-arn authored May 20, 2019
2 parents 5460dc0 + a6e62da commit bb2fa50
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 11 deletions.
12 changes: 6 additions & 6 deletions test/integration/integration.express.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ describeIfSkip('integration-express', function() {
})
);

test('Generate Error when there is no text for analysis', () =>
request(app).post('/api/tone')
test('Generate Error when there is no text for analysis', () => {
return expect(request(app).post('/api/tone')
.type('form')
.send({
language: 'en',
Expand All @@ -89,10 +89,10 @@ describeIfSkip('integration-express', function() {
include_raw: false,
text: ''
})
.then(response => {
expect(response.statusCode).toBe(500);
})
);
)
.rejects
.toMatchObject(new Error('Internal Server Error'));
});

test('Analyze tones when only text is specified', () =>
request(app).post('/api/tone')
Expand Down
10 changes: 5 additions & 5 deletions test/unit/express.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ describe('express', () => {
})
);

test('404 when page not found', () =>
request(app).get('/foo/bar').then(response => {
expect(response.statusCode).toBe(404);
})
);
test('404 when page not found', () => {
return expect(request(app).get('/foo/bar'))
.rejects
.toMatchObject(new Error('Not Found'));
});
});
6 changes: 6 additions & 0 deletions views/index.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@
<div class="banner--gdpr-description">
<$= __("gdpr-description") $>
</div>
<div class="banner--gdpr-description">
By using this application, you agree to the &nbsp;
<a target="_blank" rel="noreferrer noopener" href="https://watson-developer-cloud.github.io/terms?name=Tone%20Analyzer%20Demo">
Terms of Use
</a>
</div>
</div>
</div>
<div class="banner--service-resource-container">
Expand Down

0 comments on commit bb2fa50

Please sign in to comment.