gitlab-org--gitlab-foss/spec/models/ci/trigger_request_spec.rb
2017-09-04 21:55:26 +09:00

17 lines
408 B
Ruby

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