Skip to content

Commit

Permalink
Update 05-chat.js
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigok authored Dec 20, 2018
1 parent dca56e3 commit 5a969b1
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions tests/end-to-end/api/05-chat.js
Original file line number Diff line number Diff line change
Expand Up @@ -789,6 +789,7 @@ describe('[Chat]', function() {
});
});
});

describe('[/chat.pinMessage]', () => {
it('should return an error when pinMessage is not allowed in this server', (done) => {
updateSetting('Message_AllowPinning', false).then(() => {
Expand All @@ -807,7 +808,7 @@ describe('[Chat]', function() {
});
});

it('should return an error when pinMessage is allowed in server but user dont have permission', (done) => {
it('should return an error when pinMessage is allowed in server but user dont have permission', (done) => {
updateSetting('Message_AllowPinning', true).then(() => {
updatePermission('pin-message', []).then(() => {
request.post(api('chat.pinMessage'))
Expand All @@ -826,7 +827,7 @@ describe('[Chat]', function() {
});
});

it('should pin Message successfully', (done) => {
it('should pin Message successfully', (done) => {
updatePermission('pin-message', ['admin']).then(() => {
request.post(api('chat.pinMessage'))
.set(credentials)
Expand All @@ -844,7 +845,7 @@ describe('[Chat]', function() {
});
});

describe('[/chat.unPinMessage]', () => {
describe('[/chat.unPinMessage]', () => {
it('should return an error when pinMessage is not allowed in this server', (done) => {
updateSetting('Message_AllowPinning', false).then(() => {
request.post(api('chat.unPinMessage'))
Expand All @@ -862,7 +863,7 @@ describe('[Chat]', function() {
});
});

it('should return an error when pinMessage is allowed in server but users dont have permission', (done) => {
it('should return an error when pinMessage is allowed in server but users dont have permission', (done) => {
updateSetting('Message_AllowPinning', true).then(() => {
updatePermission('pin-message', []).then(() => {
request.post(api('chat.unPinMessage'))
Expand All @@ -881,7 +882,7 @@ describe('[Chat]', function() {
});
});

it('should unpin Message successfully', (done) => {
it('should unpin Message successfully', (done) => {
updatePermission('pin-message', ['admin']).then(() => {
request.post(api('chat.unPinMessage'))
.set(credentials)
Expand Down

0 comments on commit 5a969b1

Please sign in to comment.