   beforeEach ->
     CourseActions.loaded(COURSE, COURSE_ID)
     RosterActions.loaded(ROSTER, COURSE_ID)
-    sinon.stub(PeriodActions, 'delete').returns(null)
+    sinon.stub(PeriodActions, 'delete', (periodId) ->
+      PeriodActions._deleted(arguments...)
+      course = ld.cloneDeep(COURSE)
+      period = _.findWhere(course.periods, id: periodId)
+      period.is_archived = true
+      CourseActions.loaded(course, COURSE_ID)
+    )
     sinon.stub(PeriodActions, 'restore').returns(null)
     @props =
       courseId: COURSE_ID

        done()

  it 'can archive periods', (done) ->
    Testing.renderComponent( Roster, props: @props ).then ({dom}) ->
      Testing.actions.click(dom.querySelector('.control.archive-period'))
      _.defer ->
        Testing.actions.click(document.querySelector('button.archive-section'))
        expect(PeriodActions.delete).to.have.been.called
        done()

  it 'can view and unarchive periods', (done) ->
    Testing.renderComponent( Roster, props: @props ).then ({dom}) ->

        ['Angstrom', 'Glass', 'Hackett', 'Jaskolski', 'Lowe', 'Tromp', 'Reilly']
      )

  it 'switches roster when tab is clicked', (done) ->
    Testing.renderComponent( Roster, props: @props ).then ({dom, element}) ->
      Testing.actions.click(dom.querySelector('.periods .nav-tabs li:nth-child(2) a'))
