Skip to content

Commit

Permalink
Allow banner test to run against local file even if S3 is live
Browse files Browse the repository at this point in the history
  • Loading branch information
atz committed Jul 25, 2017
1 parent 6b1c9b3 commit 1505096
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion spec/controllers/sites_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,12 @@

context "site with existing banner image" do
before do
expect(BannerImageUploader).to receive(:storage).and_return(CarrierWave::Storage::File).at_least(3).times
f = fixture_file_upload('/images/nypl-hydra-of-lerna.jpg', 'image/jpg')
Site.instance.update(banner_image: f)
end

it "deletes a banner image" do
it "#update with remove_banner_image deletes a banner image" do
expect(Site.instance.banner_image?).to be true
post :update, params: { id: Site.instance.id, remove_banner_image: 'Remove banner image' }
expect(response).to redirect_to('/admin/appearance?locale=en')
Expand Down

0 comments on commit 1505096

Please sign in to comment.