debian-mirror-gitlab/spec/services/clusters/build_service_spec.rb

34 lines
827 B
Ruby
Raw Normal View History

2019-02-15 15:39:39 +05:30
# frozen_string_literal: true
require 'spec_helper'
2020-07-28 23:09:34 +05:30
RSpec.describe Clusters::BuildService do
2019-02-15 15:39:39 +05:30
describe '#execute' do
subject { described_class.new(cluster_subject).execute }
describe 'when cluster subject is a project' do
let(:cluster_subject) { build(:project) }
it 'sets the cluster_type to project_type' do
is_expected.to be_project_type
end
end
describe 'when cluster subject is a group' do
let(:cluster_subject) { build(:group) }
it 'sets the cluster_type to group_type' do
is_expected.to be_group_type
end
end
2019-07-31 22:56:46 +05:30
describe 'when cluster subject is an instance' do
let(:cluster_subject) { Clusters::Instance.new }
it 'sets the cluster_type to instance_type' do
is_expected.to be_instance_type
end
end
2019-02-15 15:39:39 +05:30
end
end