FIX: Toggling post's wiki status should not create a new version.

This commit is contained in:
Guo Xiang Tan
2017-01-20 14:37:22 +08:00
parent 521ced38c5
commit 32846aad2a
8 changed files with 53 additions and 9 deletions

View File

@ -30,6 +30,20 @@ widgetTest('wiki', {
}
});
widgetTest('wiki without revision', {
template: '{{mount-widget widget="post" args=args editPost="editPost"}}',
setup() {
this.set('args', { wiki: true, version: 1, canViewEditHistory: true });
this.on('editPost', () => this.editPostCalled = true);
},
test(assert) {
click('.post-info .wiki');
andThen(() => {
assert.ok(this.editPostCalled, 'clicking wiki icon edits the post');
});
}
});
widgetTest('via-email', {
template: '{{mount-widget widget="post" args=args showRawEmail="showRawEmail"}}',
setup() {