Commit 27fce039 by Menno van der Sman Committed by Jon Yurek

Add test for supplying :s3_credentials in an unsupported manor

parent 6b4d5cf7
...@@ -737,6 +737,19 @@ class S3Test < Test::Unit::TestCase ...@@ -737,6 +737,19 @@ class S3Test < Test::Unit::TestCase
end end
end end
context "An attachment with S3 storage and S3 credentials in an unsupported manor" do
setup do
rebuild_model :storage => :s3, :bucket => "testing", :s3_credentials => ["unsupported"]
@dummy = Dummy.new
end
should "not accept the credentials" do
assert_raise(ArgumentError) do
@dummy.avatar.s3_credentials
end
end
end
context "An attachment with S3 storage and S3 credentials not supplied" do context "An attachment with S3 storage and S3 credentials not supplied" do
setup do setup do
rebuild_model :storage => :s3, :bucket => "testing" rebuild_model :storage => :s3, :bucket => "testing"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment