Sha256: 822f4b6700e339d30d8abddef89df5573eac5adeb31f7e52d341119e16b2582c
Contents?: true
Size: 1.26 KB
Versions: 63
Compression:
Stored size: 1.26 KB
Contents
require 'spec_helper' require 'rspec/mocks' describe 'events' do let(:exercise) { create(:exercise) } let(:assignment) { create(:assignment, exercise: exercise) } before { organization.switch! } before { create(:chapter, lessons: [ create(:lesson, exercises: [ exercise ]) ]) } before { reindex_current_organization! } describe '#notify!' do let!(:organization) { create(:organization, name: 'pdep') } before { expect_any_instance_of(Mumukit::Nuntius::NotificationMode::Deaf).to receive(:notify!) } before { organization.switch! } it { expect { assignment.notify! }.to_not raise_error } end describe 'protect in central book' do let!(:organization) { create(:organization, name: 'central') } before { expect_any_instance_of(Mumukit::Nuntius::NotificationMode::Deaf).to receive(:notify!) } before { organization.switch! } it { expect { assignment.notify! }.to_not raise_error } end describe 'submit_solution!' do let!(:organization) { create(:organization, name: 'pdep') } before { expect_any_instance_of(Mumukit::Nuntius::NotificationMode::Deaf).to receive(:notify!) } before { organization.switch! } let(:user) { create(:user) } it { expect { exercise.submit_solution! user }.to_not raise_error } end end
Version data entries
63 entries across 63 versions & 1 rubygems