Skip to content

Commit

Permalink
Add more ConcertoConfig tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
bamnet committed Apr 29, 2012
1 parent 7eee92c commit 7f6e694
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test/unit/concerto_config_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,15 @@ class ConcertoConfigTest < ActiveSupport::TestCase
assert_equal(ConcertoConfig[:default_upload_type], "graphic")
end

# Finders still work
test "Can create or find by if needed" do
assert_difference('ConcertoConfig.count', 1) do
ConcertoConfig.find_or_create_by_key(:key => "foo", :value => "bar")
end
end

# Attribute-style syntax works
test "Attribute syntax" do
assert_equal ConcertoConfig.default_upload_type, "graphic"
end
end

0 comments on commit 7f6e694

Please sign in to comment.