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

trigger_request_spec.rb « ci « models « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: a6e8e8496ac8701f64c90dcd0dab283984da7a97 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# frozen_string_literal: true

require 'spec_helper'

RSpec.describe Ci::TriggerRequest do
  describe 'validation' do
    it 'be invalid if saving a variable' do
      trigger = build(:ci_trigger_request, variables: { TRIGGER_KEY_1: 'TRIGGER_VALUE_1' })

      expect(trigger).not_to be_valid
    end

    it 'be valid if not saving a variable' do
      trigger = build(:ci_trigger_request)

      expect(trigger).to be_valid
    end
  end
end