diff options
| author | Nihad Abbasov <narkoz.2008@gmail.com> | 2012-09-26 11:17:17 -0700 |
|---|---|---|
| committer | Nihad Abbasov <narkoz.2008@gmail.com> | 2012-09-26 11:18:35 -0700 |
| commit | 83efcabc829083f11553df0f1eb67a8fbbc3e000 (patch) | |
| tree | 2017dc24ab9630ad9a227dffde27550ededcc92f /spec/models/key_spec.rb | |
| parent | 4629cc44d6b7fa7ebdec8ce47bb0825e255d7763 (diff) | |
| download | gitlab-ce-83efcabc829083f11553df0f1eb67a8fbbc3e000.tar.gz | |
set activerecord whitelist_attributes to true
Diffstat (limited to 'spec/models/key_spec.rb')
| -rw-r--r-- | spec/models/key_spec.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/models/key_spec.rb b/spec/models/key_spec.rb index 85cd291d681..3ccfdf034de 100644 --- a/spec/models/key_spec.rb +++ b/spec/models/key_spec.rb @@ -6,6 +6,11 @@ describe Key do it { should belong_to(:project) } 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 validate_presence_of(:key) } |
