BigW Consortium Gitlab

trigger_request_spec.rb 408 Bytes
Newer Older
1 2 3 4 5 6 7
require 'spec_helper'

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' } )

8
      expect(trigger).not_to be_valid
9 10 11 12 13
    end

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

14
      expect(trigger).to be_valid
15 16 17
    end
  end
end