summaryrefslogtreecommitdiff
path: root/spec/models/note_spec.rb
diff options
context:
space:
mode:
authorNihad Abbasov <narkoz.2008@gmail.com>2012-09-26 11:17:17 -0700
committerNihad Abbasov <narkoz.2008@gmail.com>2012-09-26 11:18:35 -0700
commit83efcabc829083f11553df0f1eb67a8fbbc3e000 (patch)
tree2017dc24ab9630ad9a227dffde27550ededcc92f /spec/models/note_spec.rb
parent4629cc44d6b7fa7ebdec8ce47bb0825e255d7763 (diff)
downloadgitlab-ce-83efcabc829083f11553df0f1eb67a8fbbc3e000.tar.gz
set activerecord whitelist_attributes to true
Diffstat (limited to 'spec/models/note_spec.rb')
-rw-r--r--spec/models/note_spec.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/models/note_spec.rb b/spec/models/note_spec.rb
index 7809953f5b3..34493a1117d 100644
--- a/spec/models/note_spec.rb
+++ b/spec/models/note_spec.rb
@@ -7,6 +7,11 @@ describe Note do
it { should belong_to(:author).class_name('User') }
end
+ describe "Mass assignment" do
+ it { should_not allow_mass_assignment_of(:author) }
+ it { should_not allow_mass_assignment_of(:author_id) }
+ end
+
describe "Validation" do
it { should validate_presence_of(:note) }
it { should validate_presence_of(:project) }