Sha256: 173b6443b12671e2c7b4b93e81ff26fcde21e5d011bf4147241263914a3f8590

Contents?: true

Size: 696 Bytes

Versions: 5

Compression:

Stored size: 696 Bytes

Contents

require 'spec_helper'

describe 'Teacher Notes' do

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

  let(:teacher) { create(:teacher) }
  let(:teacher_with_note) { create(:teacher, :with_note) }
  let(:note) { create(:note) }

  context 'new', type: 'note'  do
    before do
      @resource = teacher
      visit gaku.edit_teacher_path(@resource)
      click '#notes-menu a'
    end

    it_behaves_like 'new note'
  end

  context 'existing', type: 'note'  do

    before do
      @resource = teacher_with_note
      visit gaku.edit_teacher_path(@resource)
      click '#notes-menu a'
    end

    it_behaves_like 'edit note'
    it_behaves_like 'delete note'
  end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
gaku-0.2.4 frontend/spec/features/other/teachers/notes_spec.rb
gaku-0.2.3 frontend/spec/features/other/teachers/notes_spec.rb
gaku-0.2.2 frontend/spec/features/other/teachers/notes_spec.rb
gaku-0.2.1 frontend/spec/features/other/teachers/notes_spec.rb
gaku-0.2.0 frontend/spec/features/other/teachers/notes_spec.rb