set activerecord whitelist_attributes to true

This commit is contained in:
Nihad Abbasov 2012-09-26 11:17:17 -07:00
parent 4629cc44d6
commit 83efcabc82
28 changed files with 100 additions and 44 deletions

View file

@ -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) }