Skip to content

Commit

Permalink
Add last test
Browse files Browse the repository at this point in the history
  • Loading branch information
Blaidd-Drwg committed Nov 29, 2016
1 parent 18b4205 commit 86d85de
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions spec/features/profile_spec.rb
Expand Up @@ -39,13 +39,12 @@
expect(page).to have_text(I18n.t("agreement_letters.upload_success"))
end

#scenario "user upload fails" do
#@agreement_letter = FactoryGirl.create(:agreement_letter, user: @user, event: @event)
#@agreement_letter.readonly!
#attach_file(:letter_upload, './spec/testfiles/actual.pdf')
#click_button "upload_btn_#{@event.id}"
#expect(page).to have_text(I18n.t("agreement_letters.upload_failed"))
#end
scenario "user upload fails" do
allow_any_instance_of(AgreementLettersController).to receive(:save_file).and_return(false)
attach_file(:letter_upload, './spec/testfiles/actual.pdf')
click_button "upload_btn_#{@event.id}"
expect(page).to have_text(I18n.t("agreement_letters.upload_failed"))
end
end

RSpec.feature "Profile adaptation", :type => :feature do
Expand Down

0 comments on commit 86d85de

Please sign in to comment.