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:
authorDouwe Maan <douwe@selenight.nl>2018-12-20 17:22:58 +0300
committerDouwe Maan <douwe@selenight.nl>2018-12-20 17:22:58 +0300
commitf6dd6e566a2c656f97cf7c78df482bd4ec77d006 (patch)
treefaabdccc290136b54d53a62799908288e3ebe0b3 /spec/models/diff_note_spec.rb
parentf7ac8041f7ba3639085c26b4185eda00fd54a6e7 (diff)
Add image_diff_note_on_merge_request factory
Diffstat (limited to 'spec/models/diff_note_spec.rb')
-rw-r--r--spec/models/diff_note_spec.rb17
1 files changed, 1 insertions, 16 deletions
diff --git a/spec/models/diff_note_spec.rb b/spec/models/diff_note_spec.rb
index 40ce8ab736a..fda00a693f0 100644
--- a/spec/models/diff_note_spec.rb
+++ b/spec/models/diff_note_spec.rb
@@ -337,24 +337,9 @@ describe DiffNote do
end
describe "image diff notes" do
- let(:path) { "files/images/any_image.png" }
-
- let!(:position) do
- Gitlab::Diff::Position.new(
- old_path: path,
- new_path: path,
- width: 10,
- height: 10,
- x: 1,
- y: 1,
- diff_refs: merge_request.diff_refs,
- position_type: "image"
- )
- end
+ subject { build(:image_diff_note_on_merge_request, project: project, noteable: merge_request) }
describe "validations" do
- subject { build(:diff_note_on_merge_request, project: project, position: position, noteable: merge_request) }
-
it { is_expected.not_to validate_presence_of(:line_code) }
it "does not validate diff line" do