summaryrefslogtreecommitdiff
path: root/spec/models/snippet_spec.rb
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-06-04 18:36:22 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-06-04 18:36:22 +0300
commitbcc4e4dc7ed0740e92a61fc82c3c669f8f2d8d30 (patch)
tree1df3e2d68cd524af4dce107b2e4227778bb3945d /spec/models/snippet_spec.rb
parent211e435ade337c968fab11c52427c172adcec99a (diff)
parente0af7cefb4c92b474d14116b40927d70c13e78cc (diff)
downloadgitlab-ce-bcc4e4dc7ed0740e92a61fc82c3c669f8f2d8d30.tar.gz
Merge branch 'gist' of https://github.com/Andrew8xx8/gitlabhq into Andrew8xx8-gist
Conflicts: Gemfile.lock app/models/ability.rb app/models/project.rb app/views/snippets/_form.html.haml db/schema.rb features/steps/shared/paths.rb spec/factories.rb spec/models/project_spec.rb
Diffstat (limited to 'spec/models/snippet_spec.rb')
-rw-r--r--spec/models/snippet_spec.rb3
1 files changed, 0 insertions, 3 deletions
diff --git a/spec/models/snippet_spec.rb b/spec/models/snippet_spec.rb
index e4d1934829f..52355c38f0c 100644
--- a/spec/models/snippet_spec.rb
+++ b/spec/models/snippet_spec.rb
@@ -17,19 +17,16 @@ require 'spec_helper'
describe Snippet do
describe "Associations" do
- it { should belong_to(:project) }
it { should belong_to(:author).class_name('User') }
it { should have_many(:notes).dependent(:destroy) }
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 validate_presence_of(:author) }
- it { should validate_presence_of(:project) }
it { should validate_presence_of(:title) }
it { should ensure_length_of(:title).is_within(0..255) }