Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNihad Abbasov <narkoz.2008@gmail.com>2012-09-26 22:17:17 +0400
committerNihad Abbasov <narkoz.2008@gmail.com>2012-09-26 22:18:35 +0400
commit83efcabc829083f11553df0f1eb67a8fbbc3e000 (patch)
tree2017dc24ab9630ad9a227dffde27550ededcc92f /spec/models/issue_spec.rb
parent4629cc44d6b7fa7ebdec8ce47bb0825e255d7763 (diff)
set activerecord whitelist_attributes to true
Diffstat (limited to 'spec/models/issue_spec.rb')
-rw-r--r--spec/models/issue_spec.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/models/issue_spec.rb b/spec/models/issue_spec.rb
index 34192da94ad..099c41985cb 100644
--- a/spec/models/issue_spec.rb
+++ b/spec/models/issue_spec.rb
@@ -5,6 +5,11 @@ describe Issue do
it { should belong_to(:milestone) }
end
+ describe "Mass assignment" do
+ it { should_not allow_mass_assignment_of(:author_id) }
+ it { should_not allow_mass_assignment_of(:project_id) }
+ end
+
describe "Validation" do
it { should ensure_length_of(:description).is_within(0..2000) }
it { should ensure_inclusion_of(:closed).in_array([true, false]) }