Permalink
Browse files

:pending_review is not actually a column?

  • Loading branch information...
1 parent 19856a9 commit 0d987a1d8855e53dbd3329829d85f1c03f15b033 @parndt parndt committed Apr 11, 2012
Showing with 4 additions and 5 deletions.
  1. +4 −5 spec/models/topic_spec.rb
View
9 spec/models/topic_spec.rb
@@ -8,7 +8,7 @@
}
@topic = Forem::Topic.create!(@attr)
end
-
+
it "is valid with valid attributes" do
@topic.should be_valid
end
@@ -18,17 +18,16 @@
@topic.should be_pending_review
end
end
-
+
describe "validations" do
it "requires a subject" do
@topic.subject = nil
@topic.should_not be_valid
end
end
-
+
describe "protected attributes" do
- protected_attributes = [:pinned, :locked, :pending_review]
- protected_attributes.each do |attr|
+ [:pinned, :locked].each do |attr|
it "cannot assign #{attr}" do
lambda { Forem::Topic.new(attr => true) }.should raise_error(ActiveModel::MassAssignmentSecurity::Error)
end

0 comments on commit 0d987a1

Please sign in to comment.