Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Commit ea1d3b9

Browse files
author
Vikas Agarwal
committed
Github issue#893, CoderBot message changes
— fixed unit tests
1 parent 2171bb5 commit ea1d3b9

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

src/test/app.test.js

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -237,14 +237,10 @@ describe('app', () => {
237237
});
238238

239239
describe('`project.draft-created` event', () => {
240-
it('should create `Project.Created` notification', (done) => {
240+
it('should not create `Project.Created` notification as it is disabled now', (done) => {
241241
sendTestEvent(sampleEvents.draftCreated, 'project.draft-created');
242242
setTimeout(() => {
243-
const expectedTitle = 'Your project has been created, and we\'re ready for your specification';
244-
const expectedBody = 'Hello, Coder here! Your project \'test\' has been created successfully. For your next step, please head over to the <a href="https://connect.topcoder-dev.com/projects/1/specification/" rel="nofollow">Specification</a> section and answer all of the required questions. If you already have a document with your requirements, just verify it against our checklist and then upload it. Once you\'re done, hit the "Submit for Review" button on the Specification. Get stuck or need help? Email us at <a href="mailto:support@topcoder.com?subject=Question%20Regarding%20My%20New%20Topcoder%20Connect%20Project" rel="nofollow">support@topcoder.com</a>.';
245-
const params = spy.lastCall.args;
246-
assert.equal(params[2], expectedTitle);
247-
assert.equal(params[3], expectedBody);
243+
sinon.assert.notCalled(spy);
248244
done();
249245
}, testTimeout);
250246
});
@@ -262,8 +258,8 @@ describe('app', () => {
262258
sendTestEvent(sampleEvents.updatedInReview, 'project.updated');
263259
setTimeout(() => {
264260
assertCount += 1;
265-
const expectedTitle = 'Your project has been submitted for review';
266-
const expectedBody = 'Hello, it\'s Coder again. Thanks for submitting your project <a href="https://connect.topcoder-dev.com/projects/1/" rel="nofollow">test</a>! I\'ve used my super computational powers to route it to one of our trusty humans. They\'ll get back to you in 1-2 business days.';
261+
const expectedTitle = 'Your project is being reviewed. Provide additional info if you have it.';
262+
const expectedBody = 'Hello, Coder here! Thanks for submitting your project <a href="https://connect.topcoder-dev.com/projects/1/" rel="nofollow">test</a>! I\'ve used my super computational powers to route it to one of our trusty humans. They\'ll get back to you in 1-2 business days. Meanwhile, if have any additional project information or documents to upload, please head over to the <a href="https://connect.topcoder-dev.com/projects/1/specification/" rel="nofollow">Specification</a> section. Get stuck or need help? Email us at <a href="mailto:support@topcoder.com?subject=Question%20Regarding%20My%20New%20Topcoder%20Connect%20Project" rel="nofollow">support@topcoder.com</a>.';
267263
let params = spy.lastCall.args;
268264
assert.equal(params[2], expectedTitle);
269265
assert.equal(params[3], expectedBody);

0 commit comments

Comments
 (0)