Sha256: 9549ddb0af44ab887efe056b85d928e0c1b1006db383cef095035523527be97a

Contents?: true

Size: 588 Bytes

Versions: 2

Compression:

Stored size: 588 Bytes

Contents

require 'spec_helper'

describe 'Exam Notes' do

  before { as :admin }
  before(:all) { set_resource 'exam-note' }

  let(:exam) { create(:exam) }
  let(:exam_with_note) { create(:exam, :with_note) }

  context 'new', js: true, type: 'note'  do
    before do
      @resource = exam
      visit gaku.exam_path(@resource)
    end

    it_behaves_like 'new note'
  end

  context 'existing', js: true, type: 'note'  do
    before do
      @resource = exam_with_note
      visit gaku.exam_path(@resource)
    end

    it_behaves_like 'edit note'
    it_behaves_like 'delete note'
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
gaku-0.0.3 core/spec/requests/exams/notes_spec.rb
gaku-0.0.2 core/spec/requests/exams/notes_spec.rb