Welcome to mirror list, hosted at ThFree Co, Russian Federation.

hipchat_service_spec.rb « project_services « models « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 42368c31ba08ef0640606b1e33b558fd25107b07 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# frozen_string_literal: true

require 'spec_helper'

# HipchatService is partially removed and it will be remove completely
# after the deletion of all the database records.
# https://gitlab.com/gitlab-org/gitlab/-/issues/27954
RSpec.describe HipchatService do
  let_it_be(:project) { create(:project) }

  subject(:service) { described_class.new(project: project) }

  it { is_expected.to be_valid }

  describe '#to_param' do
    subject { service.to_param }

    it { is_expected.to eq('hipchat') }
  end

  describe '#supported_events' do
    subject { service.supported_events }

    it { is_expected.to be_empty }
  end

  describe '#save' do
    it 'prevents records from being created or updated' do
      expect(service.save).to be_falsey

      expect(service.errors.full_messages).to include(
        'HipChat endpoint is deprecated and should not be created or modified.'
      )
    end
  end
end