Commit 2ccdb0eb authored by Alex Kalderimis's avatar Alex Kalderimis

Spec backwards compatibility

parent a2982584
......@@ -44,7 +44,7 @@ class Integration < ApplicationRecord
bamboo bugzilla buildkite
campfire confluence custom_issue_tracker
datadog discord drone_ci
emails_on_push ewm emails_on_push
emails_on_push ewm emails_on_push external_wiki
].to_set.freeze
def self.renamed?(name)
......
......@@ -5,7 +5,7 @@ require 'spec_helper'
RSpec.describe ServiceEventEntity do
let(:request) { double('request') }
subject { described_class.new(event, request: request, service: service).as_json }
subject { described_class.new(event, request: request, service: integration).as_json }
before do
allow(request).to receive(:service).and_return(integration)
......
......@@ -56,6 +56,7 @@ RSpec.describe ServiceFieldEntity do
context 'EmailsOnPush Service' do
let(:integration) { create(:emails_on_push_integration, send_from_committer_email: '1') }
let(:service) { integration }
context 'field with type checkbox' do
let(:field) { integration.global_fields.find { |field| field[:name] == 'send_from_committer_email' } }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment