Skip to content

Commit

Permalink
Remove notice controller code
Browse files Browse the repository at this point in the history
  • Loading branch information
tmashuang committed Apr 1, 2019
1 parent 04835b1 commit d6efee2
Show file tree
Hide file tree
Showing 7 changed files with 2 additions and 221 deletions.
5 changes: 0 additions & 5 deletions notices/README.md

This file was deleted.

179 changes: 0 additions & 179 deletions notices/archive/notice_0.md

This file was deleted.

6 changes: 0 additions & 6 deletions notices/archive/notice_2.md

This file was deleted.

11 changes: 0 additions & 11 deletions notices/archive/notice_3.md

This file was deleted.

5 changes: 0 additions & 5 deletions notices/archive/notice_4.md

This file was deleted.

8 changes: 2 additions & 6 deletions test/unit/ui/app/actions.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -1263,24 +1263,20 @@ describe('Actions', () => {
})

describe('#setCompletedOnboarding', () => {
let markAllNoticesReadSpy, completeOnboardingSpy
let completeOnboardingSpy

beforeEach(() => {
markAllNoticesReadSpy = sinon.stub(background, 'markAllNoticesRead')
markAllNoticesReadSpy.callsFake(cb => cb())
completeOnboardingSpy = sinon.stub(background, 'completeOnboarding')
completeOnboardingSpy.callsFake(cb => cb())
})

after(() => {
markAllNoticesReadSpy.restore()
completeOnboardingSpy.restore()
})

it('completing onboarding marks all notices as read', async () => {
it('completes onboarding', async () => {
const store = mockStore()
await store.dispatch(actions.setCompletedOnboarding())
assert.equal(markAllNoticesReadSpy.callCount, 1)
assert.equal(completeOnboardingSpy.callCount, 1)
})
})
Expand Down
9 changes: 0 additions & 9 deletions ui/app/store/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -2443,15 +2443,6 @@ function setCompletedOnboarding () {
return async dispatch => {
dispatch(actions.showLoadingIndication())

try {
await pify(background.markAllNoticesRead).call(background)
} catch (err) {
dispatch(actions.displayWarning(err.message))
throw err
}

dispatch(actions.clearNotices())

try {
await pify(background.completeOnboarding).call(background)
} catch (err) {
Expand Down

0 comments on commit d6efee2

Please sign in to comment.