diff --git a/spec/models/file_review_spec.rb b/spec/models/file_review_spec.rb index f198fdf49..1ea3d063d 100644 --- a/spec/models/file_review_spec.rb +++ b/spec/models/file_review_spec.rb @@ -12,14 +12,14 @@ file_review = FileReview.new violation_message = "violation found!" - file_review.build_violation(line, violation_message, "debugger") + file_review.build_violation(line, violation_message, "foo = bar(1, 2)") violation = file_review.violations.first expect(file_review.violations.size).to eq 1 expect(violation.patch_position).to eq line.patch_position expect(violation.line_number).to eq line.number expect(violation.messages).to eq [violation_message] - expect(violation.source).to eq "debugger" + expect(violation.source).to eq "foo = bar(1, 2)" end end @@ -28,7 +28,7 @@ line = build_line(changed: false) file_review = FileReview.new - file_review.build_violation(line, "hello", "debugger") + file_review.build_violation(line, "hello", "foo = bar(1, 2)") expect(file_review.violations).to be_empty end @@ -41,8 +41,8 @@ line = build_line file_review = FileReview.new - file_review.build_violation(line, first_violation_message, "debugger") - file_review.build_violation(line, other_violation_message, "debugger") + file_review.build_violation(line, first_violation_message, "foo = bar(1, 2)") + file_review.build_violation(line, other_violation_message, "foo = bar(1, 2)") violation = file_review.violations.first expect(file_review.violations.size).to eq 1 diff --git a/spec/requests/builds_spec.rb b/spec/requests/builds_spec.rb index 073dbbb52..1307a4a12 100644 --- a/spec/requests/builds_spec.rb +++ b/spec/requests/builds_spec.rb @@ -15,17 +15,17 @@ existing_comment_violation = { line: 5, message: "Line is too long.", - source: "debugger", + source: "foo = 'bbbbaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaarrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr';", } new_violation1 = { line: 3, - message: "Trailing whitespace detected.", - source: "debugger", + message: "Avoid empty else-clauses.", + source: "else {}", } new_violation2 = { line: 9, message: "Avoid empty else-clauses.", - source: "debugger", + source: "else {}", } violations = [new_violation1, existing_comment_violation, new_violation2] create(:repo, :active, github_id: repo_id, name: repo_name) diff --git a/spec/services/complete_file_review_spec.rb b/spec/services/complete_file_review_spec.rb index ebff6fa99..fd750b0cd 100644 --- a/spec/services/complete_file_review_spec.rb +++ b/spec/services/complete_file_review_spec.rb @@ -63,7 +63,7 @@ def attributes commit_sha: "abc123", pull_request_number: 123, patch: File.read("spec/support/fixtures/patch.diff"), - violations: [line: 14, message: "woohoo", source: "debugger"], + violations: [line: 14, message: "woohoo", source: "foo = bar(1, 2)"], error: "Your linter config is invalid", } end