summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShinya Maeda <shinya@gitlab.com>2017-10-31 01:09:39 +0900
committerShinya Maeda <shinya@gitlab.com>2017-10-31 01:09:39 +0900
commit944149ec1602e72215283a77ab0b72dabd7ce8b8 (patch)
tree71bdbf52d0cbb7f9066938ffd9dbab2870a77b1f
parentc43a82cdfa8c5c1d045e2628330953227dcc9767 (diff)
downloadgitlab-ce-944149ec1602e72215283a77ab0b72dabd7ce8b8.tar.gz
spec for spec/presenters
-rw-r--r--spec/presenters/clusters/cluster_presenter_spec.rb (renamed from spec/presenters/gcp/cluster_presenter_spec.rb)11
1 files changed, 5 insertions, 6 deletions
diff --git a/spec/presenters/gcp/cluster_presenter_spec.rb b/spec/presenters/clusters/cluster_presenter_spec.rb
index 8d86dc31582..48d4f3671c5 100644
--- a/spec/presenters/gcp/cluster_presenter_spec.rb
+++ b/spec/presenters/clusters/cluster_presenter_spec.rb
@@ -1,8 +1,7 @@
require 'spec_helper'
-describe Gcp::ClusterPresenter do
- let(:project) { create(:project) }
- let(:cluster) { create(:gcp_cluster, project: project) }
+describe Clusters::ClusterPresenter do
+ let(:cluster) { create(:cluster, :provided_by_gcp) }
subject(:presenter) do
described_class.new(cluster)
@@ -22,14 +21,14 @@ describe Gcp::ClusterPresenter do
end
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
describe '#gke_cluster_url' do
subject { described_class.new(cluster).gke_cluster_url }
- it { is_expected.to include(cluster.gcp_cluster_zone) }
- it { is_expected.to include(cluster.gcp_cluster_name) }
+ it { is_expected.to include(cluster.provider.zone) }
+ it { is_expected.to include(cluster.name) }
end
end