From d2a0b089f4b65ee95ed55d5b73bd6110ff32aa15 Mon Sep 17 00:00:00 2001 From: evazion Date: Wed, 19 Oct 2016 19:18:50 -0500 Subject: [PATCH] Add test for setting invalid ratings. --- test/unit/post_test.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/unit/post_test.rb b/test/unit/post_test.rb index 6173c2179..b754dfbc5 100644 --- a/test/unit/post_test.rb +++ b/test/unit/post_test.rb @@ -1060,6 +1060,16 @@ class PostTest < ActiveSupport::TestCase end end + context "Updating:" do + context "A rating unlocked post" do + setup { @post = FactoryGirl.create(:post) } + subject { @post } + + should_not allow_value("S", "safe", "derp").for(:rating) + should allow_value("s", "q", "e").for(:rating) + end + end + context "Favorites:" do context "Removing a post from a user's favorites" do setup do