gitlab-org--gitlab-foss/spec/models/ci/trigger_request_spec.rb
Thong Kuah a2cfc150ce Add # frozen_string_literal to spec/models
Adds `# frozen_string_literal: true` to spec/models ruby files
2019-04-01 14:37:54 +13:00

19 lines
439 B
Ruby

# frozen_string_literal: true
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' } )
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