set activerecord whitelist_attributes to true
This commit is contained in:
parent
4629cc44d6
commit
83efcabc82
28 changed files with 100 additions and 44 deletions
|
@ -7,6 +7,11 @@ describe Wiki do
|
|||
it { should have_many(:notes).dependent(:destroy) }
|
||||
end
|
||||
|
||||
describe "Mass assignment" do
|
||||
it { should_not allow_mass_assignment_of(:project_id) }
|
||||
it { should_not allow_mass_assignment_of(:user_id) }
|
||||
end
|
||||
|
||||
describe "Validation" do
|
||||
it { should validate_presence_of(:title) }
|
||||
it { should ensure_length_of(:title).is_within(1..250) }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue