Skip to content

Commit a352968

Browse files
committed
don't write to s3 when unit testing
1 parent 0964e77 commit a352968

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

dashboard/test/controllers/level_sources_controller_test.rb

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@ class LevelSourcesControllerTest < ActionController::TestCase
55
@admin = create(:admin)
66
@level_source = create(:level_source)
77
@hidden_level_source = create(:level_source, hidden: true)
8-
9-
# so we actually test this
10-
CDO.disable_s3_image_uploads = false
118
end
129

1310
test "should get edit" do

dashboard/test/test_helper.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ class ActiveSupport::TestCase
2525

2626
setup do
2727
set_env :test
28+
29+
AWS::S3.stubs(:upload_to_bucket).raises("Don't actually upload anything to S3 in tests... mock it if you want to test it")
2830
end
2931

3032
teardown do

0 commit comments

Comments
 (0)