Skip to content

Commit

Permalink
Merge pull request #713 from coursemology-collab/allen/100-coverage
Browse files Browse the repository at this point in the history
100% coverage
  • Loading branch information
lowjoel committed Jan 13, 2016
2 parents 1918729 + 2b44a71 commit 3e824b9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@ class Course::Assessment::ProgrammingEvaluationsController < ApplicationControll
authorize_resource :programming_evaluation, class: Course::Assessment::ProgrammingEvaluation.name,
except: [:allocate, :package]

def index
@programming_evaluations = @programming_evaluations.with_language(language_param)
end

def allocate
save_success = @programming_evaluations.
each { |evaluation| evaluation.assign!(current_user) }.
Expand Down
12 changes: 12 additions & 0 deletions spec/controllers/user/omniauth_callbacks_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,18 @@
expect(flash[:danger]).to eq(I18n.t('user.omniauth_callbacks.facebook.sign_in_failure'))
end
end

context 'when the user is signed in' do
let(:user) { create(:user) }
before { sign_in(user) }

it 'shows an error message when omniauth data is incomplete' do
facebook_data.uid = nil

subject
expect(flash[:danger]).to eq(I18n.t('user.omniauth_callbacks.facebook.failed'))
end
end
end
end
end

0 comments on commit 3e824b9

Please sign in to comment.