spec for spec/presenters
This commit is contained in:
parent
c43a82cdfa
commit
944149ec16
1 changed files with 5 additions and 6 deletions
|
@ -1,8 +1,7 @@
|
||||||
require 'spec_helper'
|
require 'spec_helper'
|
||||||
|
|
||||||
describe Gcp::ClusterPresenter do
|
describe Clusters::ClusterPresenter do
|
||||||
let(:project) { create(:project) }
|
let(:cluster) { create(:cluster, :provided_by_gcp) }
|
||||||
let(:cluster) { create(:gcp_cluster, project: project) }
|
|
||||||
|
|
||||||
subject(:presenter) do
|
subject(:presenter) do
|
||||||
described_class.new(cluster)
|
described_class.new(cluster)
|
||||||
|
@ -22,14 +21,14 @@ describe Gcp::ClusterPresenter do
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'forwards missing methods to cluster' do
|
it 'forwards missing methods to cluster' do
|
||||||
expect(presenter.gcp_cluster_zone).to eq(cluster.gcp_cluster_zone)
|
expect(presenter.status).to eq(cluster.status)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
describe '#gke_cluster_url' do
|
describe '#gke_cluster_url' do
|
||||||
subject { described_class.new(cluster).gke_cluster_url }
|
subject { described_class.new(cluster).gke_cluster_url }
|
||||||
|
|
||||||
it { is_expected.to include(cluster.gcp_cluster_zone) }
|
it { is_expected.to include(cluster.provider.zone) }
|
||||||
it { is_expected.to include(cluster.gcp_cluster_name) }
|
it { is_expected.to include(cluster.name) }
|
||||||
end
|
end
|
||||||
end
|
end
|
Loading…
Reference in a new issue