clusters_controller_spec.rb 19.5 KB
Newer Older
1 2
# frozen_string_literal: true

Kamil Trzcinski's avatar
Kamil Trzcinski committed
3 4
require 'spec_helper'

5
describe ClustersController do
Kamil Trzcinski's avatar
Kamil Trzcinski committed
6
  include AccessMatchersForController
7
  include GoogleApi::CloudPlatformHelpers
Kamil Trzcinski's avatar
Kamil Trzcinski committed
8 9 10

  set(:project) { create(:project) }

11
  let(:user) { create(:user) }
Kamil Trzcinski's avatar
Kamil Trzcinski committed
12

13 14 15 16
  before do
    project.add_maintainer(user)
    sign_in(user)
  end
Kamil Trzcinski's avatar
Kamil Trzcinski committed
17

18
  describe 'GET index' do
19 20
    def go(params = {})
      get :index, params.reverse_merge(namespace_id: project.namespace.to_param, project_id: project)
21 22 23
    end

    describe 'functionality' do
Kamil Trzcinski's avatar
Kamil Trzcinski committed
24 25
      context 'when project has one or more clusters' do
        let(:project) { create(:project) }
26
        let!(:enabled_cluster) { create(:cluster, :provided_by_gcp, projects: [project]) }
27
        let!(:disabled_cluster) { create(:cluster, :disabled, :provided_by_gcp, :production_environment, projects: [project]) }
Kamil Trzcinski's avatar
Kamil Trzcinski committed
28
        it 'lists available clusters' do
29
          go
Kamil Trzcinski's avatar
Kamil Trzcinski committed
30 31 32 33 34 35 36 37 38 39

          expect(response).to have_gitlab_http_status(:ok)
          expect(response).to render_template(:index)
          expect(assigns(:clusters)).to match_array([enabled_cluster, disabled_cluster])
        end

        context 'when page is specified' do
          let(:last_page) { project.clusters.page.total_pages }

          before do
40
            allow(Clusters::Cluster).to receive(:paginates_per).and_return(1)
41
            create_list(:cluster, 2, :provided_by_gcp, :production_environment, projects: [project])
Kamil Trzcinski's avatar
Kamil Trzcinski committed
42 43 44
          end

          it 'redirects to the page' do
45
            go(page: last_page)
46

Kamil Trzcinski's avatar
Kamil Trzcinski committed
47 48 49 50 51 52 53 54 55 56
            expect(response).to have_gitlab_http_status(:ok)
            expect(assigns(:clusters).current_page).to eq(last_page)
          end
        end
      end

      context 'when project does not have a cluster' do
        let(:project) { create(:project) }

        it 'returns an empty state page' do
57
          go
Kamil Trzcinski's avatar
Kamil Trzcinski committed
58 59

          expect(response).to have_gitlab_http_status(:ok)
60
          expect(response).to render_template(:index, partial: :empty_state)
Kamil Trzcinski's avatar
Kamil Trzcinski committed
61 62 63 64 65 66 67 68
          expect(assigns(:clusters)).to eq([])
        end
      end
    end

    describe 'security' do
      let(:cluster) { create(:cluster, :provided_by_gcp, projects: [project]) }

69 70 71 72 73 74 75 76
      it { expect { go }.to be_allowed_for(:admin) }
      it { expect { go }.to be_allowed_for(:owner).of(project) }
      it { expect { go }.to be_allowed_for(:maintainer).of(project) }
      it { expect { go }.to be_denied_for(:developer).of(project) }
      it { expect { go }.to be_denied_for(:reporter).of(project) }
      it { expect { go }.to be_denied_for(:guest).of(project) }
      it { expect { go }.to be_denied_for(:user) }
      it { expect { go }.to be_denied_for(:external) }
Kamil Trzcinski's avatar
Kamil Trzcinski committed
77 78 79
    end
  end

80
  describe 'GET new' do
81
    def go
82 83
      get :new, namespace_id: project.namespace, project_id: project
    end
84

85
    describe 'functionality for new cluster' do
86 87 88 89 90 91 92 93 94 95
      context 'when omniauth has been configured' do
        let(:key) { 'secret-key' }
        let(:session_key_for_redirect_uri) do
          GoogleApi::CloudPlatform::Client.session_key_for_redirect_uri(key)
        end

        before do
          allow(SecureRandom).to receive(:hex).and_return(key)
        end

96
        it 'has authorize_url' do
97
          go
98

99
          expect(assigns(:authorize_url)).to include(key)
100 101 102 103 104 105 106 107 108
          expect(session[session_key_for_redirect_uri]).to eq(new_project_cluster_path(project))
        end
      end

      context 'when omniauth has not configured' do
        before do
          stub_omniauth_setting(providers: [])
        end

109
        it 'does not have authorize_url' do
110
          go
111

112
          expect(assigns(:authorize_url)).to be_nil
113 114 115 116 117 118 119 120 121
        end
      end

      context 'when access token is valid' do
        before do
          stub_google_api_validate_token
        end

        it 'has new object' do
122
          go
123

Dennis Tang's avatar
Dennis Tang committed
124
          expect(assigns(:gcp_cluster)).to be_an_instance_of(Clusters::Cluster)
125 126 127 128 129 130 131 132
        end
      end

      context 'when access token is expired' do
        before do
          stub_google_api_expired_token
        end

133
        it { expect(@valid_gcp_token).to be_falsey }
134 135 136
      end

      context 'when access token is not stored in session' do
137
        it { expect(@valid_gcp_token).to be_falsey }
138 139 140
      end
    end

141
    describe 'functionality for existing cluster' do
142
      it 'has new object' do
143
        go
144

Dennis Tang's avatar
Dennis Tang committed
145
        expect(assigns(:user_cluster)).to be_an_instance_of(Clusters::Cluster)
146 147 148 149
      end
    end

    describe 'security' do
150 151 152 153 154 155 156 157
      it { expect { go }.to be_allowed_for(:admin) }
      it { expect { go }.to be_allowed_for(:owner).of(project) }
      it { expect { go }.to be_allowed_for(:maintainer).of(project) }
      it { expect { go }.to be_denied_for(:developer).of(project) }
      it { expect { go }.to be_denied_for(:reporter).of(project) }
      it { expect { go }.to be_denied_for(:guest).of(project) }
      it { expect { go }.to be_denied_for(:user) }
      it { expect { go }.to be_denied_for(:external) }
158 159 160
    end
  end

161
  describe 'POST create for new cluster' do
162
    let(:legacy_abac_param) { 'true' }
163 164 165 166 167
    let(:params) do
      {
        cluster: {
          name: 'new-cluster',
          provider_gcp_attributes: {
168 169
            gcp_project_id: 'gcp-project-12345',
            legacy_abac: legacy_abac_param
170 171 172 173 174
          }
        }
      }
    end

175
    def go
176 177
      post :create_gcp, params.merge(namespace_id: project.namespace, project_id: project)
    end
178

179
    describe 'functionality' do
180 181 182 183 184 185 186
      context 'when access token is valid' do
        before do
          stub_google_api_validate_token
        end

        it 'creates a new cluster' do
          expect(ClusterProvisionWorker).to receive(:perform_async)
187
          expect { go }.to change { Clusters::Cluster.count }
188 189 190 191
            .and change { Clusters::Providers::Gcp.count }
          expect(response).to redirect_to(project_cluster_path(project, project.clusters.first))
          expect(project.clusters.first).to be_gcp
          expect(project.clusters.first).to be_kubernetes
192 193 194 195 196 197 198 199
          expect(project.clusters.first.provider_gcp).to be_legacy_abac
        end

        context 'when legacy_abac param is false' do
          let(:legacy_abac_param) { 'false' }

          it 'creates a new cluster with legacy_abac_disabled' do
            expect(ClusterProvisionWorker).to receive(:perform_async)
200
            expect { go }.to change { Clusters::Cluster.count }
201 202 203
              .and change { Clusters::Providers::Gcp.count }
            expect(project.clusters.first.provider_gcp).not_to be_legacy_abac
          end
204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222
        end
      end

      context 'when access token is expired' do
        before do
          stub_google_api_expired_token
        end

        it { expect(@valid_gcp_token).to be_falsey }
      end

      context 'when access token is not stored in session' do
        it { expect(@valid_gcp_token).to be_falsey }
      end
    end

    describe 'security' do
      before do
        allow_any_instance_of(described_class)
223
          .to receive(:token_in_session).and_return('token')
224
        allow_any_instance_of(described_class)
225
          .to receive(:expires_at_in_session).and_return(1.hour.since.to_i.to_s)
226 227 228 229 230 231 232 233 234 235 236
        allow_any_instance_of(GoogleApi::CloudPlatform::Client)
          .to receive(:projects_zones_clusters_create) do
          OpenStruct.new(
            self_link: 'projects/gcp-project-12345/zones/us-central1-a/operations/ope-123',
            status: 'RUNNING'
          )
        end

        allow(WaitForClusterCreationWorker).to receive(:perform_in).and_return(nil)
      end

237 238 239 240 241 242 243 244
      it { expect { go }.to be_allowed_for(:admin) }
      it { expect { go }.to be_allowed_for(:owner).of(project) }
      it { expect { go }.to be_allowed_for(:maintainer).of(project) }
      it { expect { go }.to be_denied_for(:developer).of(project) }
      it { expect { go }.to be_denied_for(:reporter).of(project) }
      it { expect { go }.to be_denied_for(:guest).of(project) }
      it { expect { go }.to be_denied_for(:user) }
      it { expect { go }.to be_denied_for(:external) }
245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261
    end
  end

  describe 'POST create for existing cluster' do
    let(:params) do
      {
        cluster: {
          name: 'new-cluster',
          platform_kubernetes_attributes: {
            api_url: 'http://my-url',
            token: 'test',
            namespace: 'aaa'
          }
        }
      }
    end

262
    def go
263 264
      post :create_user, params.merge(namespace_id: project.namespace, project_id: project)
    end
265

266
    describe 'functionality' do
267 268 269
      context 'when creates a cluster' do
        it 'creates a new cluster' do
          expect(ClusterProvisionWorker).to receive(:perform_async)
270

271
          expect { go }.to change { Clusters::Cluster.count }
272
            .and change { Clusters::Platforms::Kubernetes.count }
273

274
          expect(response).to redirect_to(project_cluster_path(project, project.clusters.first))
275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298

          expect(project.clusters.first).to be_user
          expect(project.clusters.first).to be_kubernetes
        end
      end

      context 'when creates a RBAC-enabled cluster' do
        let(:params) do
          {
            cluster: {
              name: 'new-cluster',
              platform_kubernetes_attributes: {
                api_url: 'http://my-url',
                token: 'test',
                namespace: 'aaa',
                authorization_type: 'rbac'
              }
            }
          }
        end

        it 'creates a new cluster' do
          expect(ClusterProvisionWorker).to receive(:perform_async)

299
          expect { go }.to change { Clusters::Cluster.count }
300 301 302 303
            .and change { Clusters::Platforms::Kubernetes.count }

          expect(response).to redirect_to(project_cluster_path(project, project.clusters.first))

304 305
          expect(project.clusters.first).to be_user
          expect(project.clusters.first).to be_kubernetes
306
          expect(project.clusters.first).to be_platform_kubernetes_rbac
307 308 309 310 311
        end
      end
    end

    describe 'security' do
312 313 314 315 316 317 318 319
      it { expect { go }.to be_allowed_for(:admin) }
      it { expect { go }.to be_allowed_for(:owner).of(project) }
      it { expect { go }.to be_allowed_for(:maintainer).of(project) }
      it { expect { go }.to be_denied_for(:developer).of(project) }
      it { expect { go }.to be_denied_for(:reporter).of(project) }
      it { expect { go }.to be_denied_for(:guest).of(project) }
      it { expect { go }.to be_denied_for(:user) }
      it { expect { go }.to be_denied_for(:external) }
320 321 322
    end
  end

Kamil Trzcinski's avatar
Kamil Trzcinski committed
323 324 325
  describe 'GET status' do
    let(:cluster) { create(:cluster, :providing_by_gcp, projects: [project]) }

326
    def go
327
      get :status,
328 329
        namespace_id: project.namespace.to_param,
        project_id: project.to_param,
330 331
        id: cluster,
        format: :json
332
    end
Kamil Trzcinski's avatar
Kamil Trzcinski committed
333

334
    describe 'functionality' do
Kamil Trzcinski's avatar
Kamil Trzcinski committed
335
      it "responds with matching schema" do
336
        go
Kamil Trzcinski's avatar
Kamil Trzcinski committed
337 338 339 340

        expect(response).to have_gitlab_http_status(:ok)
        expect(response).to match_response_schema('cluster_status')
      end
341

342 343
      it 'invokes schedule_status_update on each application' do
        expect_any_instance_of(Clusters::Applications::Ingress).to receive(:schedule_status_update)
344

345
        go
346
      end
Kamil Trzcinski's avatar
Kamil Trzcinski committed
347 348 349
    end

    describe 'security' do
350 351 352 353 354 355 356 357
      it { expect { go }.to be_allowed_for(:admin) }
      it { expect { go }.to be_allowed_for(:owner).of(project) }
      it { expect { go }.to be_allowed_for(:maintainer).of(project) }
      it { expect { go }.to be_denied_for(:developer).of(project) }
      it { expect { go }.to be_denied_for(:reporter).of(project) }
      it { expect { go }.to be_denied_for(:guest).of(project) }
      it { expect { go }.to be_denied_for(:user) }
      it { expect { go }.to be_denied_for(:external) }
Kamil Trzcinski's avatar
Kamil Trzcinski committed
358 359 360 361 362 363
    end
  end

  describe 'GET show' do
    let(:cluster) { create(:cluster, :provided_by_gcp, projects: [project]) }

364
    def go
365 366 367 368
      get :show,
        namespace_id: project.namespace,
        project_id: project,
        id: cluster
369
    end
Kamil Trzcinski's avatar
Kamil Trzcinski committed
370

371
    describe 'functionality' do
Kamil Trzcinski's avatar
Kamil Trzcinski committed
372
      it "renders view" do
373
        go
Kamil Trzcinski's avatar
Kamil Trzcinski committed
374 375 376 377 378 379 380

        expect(response).to have_gitlab_http_status(:ok)
        expect(assigns(:cluster)).to eq(cluster)
      end
    end

    describe 'security' do
381 382 383 384 385 386 387 388
      it { expect { go }.to be_allowed_for(:admin) }
      it { expect { go }.to be_allowed_for(:owner).of(project) }
      it { expect { go }.to be_allowed_for(:maintainer).of(project) }
      it { expect { go }.to be_denied_for(:developer).of(project) }
      it { expect { go }.to be_denied_for(:reporter).of(project) }
      it { expect { go }.to be_denied_for(:guest).of(project) }
      it { expect { go }.to be_denied_for(:user) }
      it { expect { go }.to be_denied_for(:external) }
Kamil Trzcinski's avatar
Kamil Trzcinski committed
389 390 391 392
    end
  end

  describe 'PUT update' do
393
    let(:cluster) { create(:cluster, :provided_by_gcp, projects: [project]) }
Kamil Trzcinski's avatar
Kamil Trzcinski committed
394

395 396 397 398 399 400 401
    let(:params) do
      {
        cluster: {
          enabled: false,
          name: 'my-new-cluster-name',
          platform_kubernetes_attributes: {
            namespace: 'my-namespace'
Kamil Trzcinski's avatar
Kamil Trzcinski committed
402
          }
403 404 405
        }
      }
    end
Kamil Trzcinski's avatar
Kamil Trzcinski committed
406

407
    def go(format: :html)
408 409
      put :update, params.merge(namespace_id: project.namespace.to_param,
                                project_id: project.to_param,
410 411 412
                                id: cluster,
                                format: format
                               )
413
    end
Kamil Trzcinski's avatar
Kamil Trzcinski committed
414

415 416
    context 'when cluster is provided by GCP' do
      it "updates and redirects back to show page" do
417
        go
Kamil Trzcinski's avatar
Kamil Trzcinski committed
418

419 420 421 422 423
        cluster.reload
        expect(response).to redirect_to(project_cluster_path(project, cluster))
        expect(flash[:notice]).to eq('Kubernetes cluster was successfully updated.')
        expect(cluster.enabled).to be_falsey
      end
Kamil Trzcinski's avatar
Kamil Trzcinski committed
424

425
      it "does not change cluster name" do
426
        go
Kamil Trzcinski's avatar
Kamil Trzcinski committed
427

428 429 430
        cluster.reload
        expect(cluster.name).to eq('test-cluster')
      end
Kamil Trzcinski's avatar
Kamil Trzcinski committed
431

432 433
      context 'when cluster is being created' do
        let(:cluster) { create(:cluster, :providing_by_gcp, projects: [project]) }
Kamil Trzcinski's avatar
Kamil Trzcinski committed
434

435
        it "rejects changes" do
436
          go
437 438 439 440

          expect(response).to have_gitlab_http_status(:ok)
          expect(response).to render_template(:show)
          expect(cluster.enabled).to be_truthy
Kamil Trzcinski's avatar
Kamil Trzcinski committed
441 442 443 444
        end
      end
    end

445
    context 'when cluster is provided by user' do
Kamil Trzcinski's avatar
Kamil Trzcinski committed
446 447
      let(:cluster) { create(:cluster, :provided_by_user, projects: [project]) }

448 449 450 451 452 453 454 455 456 457 458 459 460
      let(:params) do
        {
          cluster: {
            enabled: false,
            name: 'my-new-cluster-name',
            platform_kubernetes_attributes: {
              namespace: 'my-namespace'
            }
          }
        }
      end

      it "updates and redirects back to show page" do
461
        go
462 463 464 465 466 467 468

        cluster.reload
        expect(response).to redirect_to(project_cluster_path(project, cluster))
        expect(flash[:notice]).to eq('Kubernetes cluster was successfully updated.')
        expect(cluster.enabled).to be_falsey
        expect(cluster.name).to eq('my-new-cluster-name')
        expect(cluster.platform_kubernetes.namespace).to eq('my-namespace')
Kamil Trzcinski's avatar
Kamil Trzcinski committed
469 470 471
      end

      context 'when format is json' do
Kamil Trzcinski's avatar
Kamil Trzcinski committed
472 473 474 475 476 477 478 479 480 481
        context 'when changing parameters' do
          context 'when valid parameters are used' do
            let(:params) do
              {
                cluster: {
                  enabled: false,
                  name: 'my-new-cluster-name',
                  platform_kubernetes_attributes: {
                    namespace: 'my-namespace'
                  }
Kamil Trzcinski's avatar
Kamil Trzcinski committed
482 483
                }
              }
Kamil Trzcinski's avatar
Kamil Trzcinski committed
484
            end
Kamil Trzcinski's avatar
Kamil Trzcinski committed
485

Kamil Trzcinski's avatar
Kamil Trzcinski committed
486
            it "updates and redirects back to show page" do
487
              go(format: :json)
Kamil Trzcinski's avatar
Kamil Trzcinski committed
488

Kamil Trzcinski's avatar
Kamil Trzcinski committed
489 490 491 492 493 494
              cluster.reload
              expect(response).to have_http_status(:no_content)
              expect(cluster.enabled).to be_falsey
              expect(cluster.name).to eq('my-new-cluster-name')
              expect(cluster.platform_kubernetes.namespace).to eq('my-namespace')
            end
Kamil Trzcinski's avatar
Kamil Trzcinski committed
495 496
          end

Kamil Trzcinski's avatar
Kamil Trzcinski committed
497 498 499 500 501 502 503 504 505 506 507
          context 'when invalid parameters are used' do
            let(:params) do
              {
                cluster: {
                  enabled: false,
                  platform_kubernetes_attributes: {
                    namespace: 'my invalid namespace #@'
                  }
                }
              }
            end
Kamil Trzcinski's avatar
Kamil Trzcinski committed
508 509

            it "rejects changes" do
510
              go(format: :json)
Kamil Trzcinski's avatar
Kamil Trzcinski committed
511 512 513 514 515 516 517 518 519

              expect(response).to have_http_status(:bad_request)
            end
          end
        end
      end
    end

    describe 'security' do
520
      set(:cluster) { create(:cluster, :provided_by_gcp, projects: [project]) }
Kamil Trzcinski's avatar
Kamil Trzcinski committed
521

522 523 524 525 526 527 528 529
      it { expect { go }.to be_allowed_for(:admin) }
      it { expect { go }.to be_allowed_for(:owner).of(project) }
      it { expect { go }.to be_allowed_for(:maintainer).of(project) }
      it { expect { go }.to be_denied_for(:developer).of(project) }
      it { expect { go }.to be_denied_for(:reporter).of(project) }
      it { expect { go }.to be_denied_for(:guest).of(project) }
      it { expect { go }.to be_denied_for(:user) }
      it { expect { go }.to be_denied_for(:external) }
Kamil Trzcinski's avatar
Kamil Trzcinski committed
530 531 532 533
    end
  end

  describe 'DELETE destroy' do
534
    let!(:cluster) { create(:cluster, :provided_by_gcp, :production_environment, projects: [project]) }
Kamil Trzcinski's avatar
Kamil Trzcinski committed
535

536
    def go
537 538 539 540
      delete :destroy,
        namespace_id: project.namespace,
        project_id: project,
        id: cluster
541
    end
Kamil Trzcinski's avatar
Kamil Trzcinski committed
542

543
    describe 'functionality' do
544
      context 'when cluster is provided by GCP' do
Kamil Trzcinski's avatar
Kamil Trzcinski committed
545 546
        context 'when cluster is created' do
          it "destroys and redirects back to clusters list" do
547
            expect { go }
Kamil Trzcinski's avatar
Kamil Trzcinski committed
548 549 550 551
              .to change { Clusters::Cluster.count }.by(-1)
              .and change { Clusters::Platforms::Kubernetes.count }.by(-1)
              .and change { Clusters::Providers::Gcp.count }.by(-1)

552
            expect(response).to redirect_to(project_clusters_path(project))
553
            expect(flash[:notice]).to eq('Kubernetes cluster integration was successfully removed.')
Kamil Trzcinski's avatar
Kamil Trzcinski committed
554 555 556 557
          end
        end

        context 'when cluster is being created' do
558
          let!(:cluster) { create(:cluster, :providing_by_gcp, :production_environment, projects: [project]) }
Kamil Trzcinski's avatar
Kamil Trzcinski committed
559 560

          it "destroys and redirects back to clusters list" do
561
            expect { go }
Kamil Trzcinski's avatar
Kamil Trzcinski committed
562 563 564
              .to change { Clusters::Cluster.count }.by(-1)
              .and change { Clusters::Providers::Gcp.count }.by(-1)

565
            expect(response).to redirect_to(project_clusters_path(project))
566
            expect(flash[:notice]).to eq('Kubernetes cluster integration was successfully removed.')
Kamil Trzcinski's avatar
Kamil Trzcinski committed
567 568 569 570
          end
        end
      end

571
      context 'when cluster is provided by user' do
572
        let!(:cluster) { create(:cluster, :provided_by_user, :production_environment, projects: [project]) }
Kamil Trzcinski's avatar
Kamil Trzcinski committed
573

574
        it "destroys and redirects back to clusters list" do
575
          expect { go }
576 577 578
            .to change { Clusters::Cluster.count }.by(-1)
            .and change { Clusters::Platforms::Kubernetes.count }.by(-1)
            .and change { Clusters::Providers::Gcp.count }.by(0)
Kamil Trzcinski's avatar
Kamil Trzcinski committed
579

580
          expect(response).to redirect_to(project_clusters_path(project))
581
          expect(flash[:notice]).to eq('Kubernetes cluster integration was successfully removed.')
Kamil Trzcinski's avatar
Kamil Trzcinski committed
582 583 584 585 586
        end
      end
    end

    describe 'security' do
587
      set(:cluster) { create(:cluster, :provided_by_gcp, :production_environment, projects: [project]) }
Kamil Trzcinski's avatar
Kamil Trzcinski committed
588

589 590 591 592 593 594 595 596
      it { expect { go }.to be_allowed_for(:admin) }
      it { expect { go }.to be_allowed_for(:owner).of(project) }
      it { expect { go }.to be_allowed_for(:maintainer).of(project) }
      it { expect { go }.to be_denied_for(:developer).of(project) }
      it { expect { go }.to be_denied_for(:reporter).of(project) }
      it { expect { go }.to be_denied_for(:guest).of(project) }
      it { expect { go }.to be_denied_for(:user) }
      it { expect { go }.to be_denied_for(:external) }
Kamil Trzcinski's avatar
Kamil Trzcinski committed
597 598
    end
  end
599 600 601 602 603 604

  context 'no project_id param' do
    it 'does not respond to any action without project_id param' do
      expect { get :index }.to raise_error(ActionController::UrlGenerationError)
    end
  end
Kamil Trzcinski's avatar
Kamil Trzcinski committed
605
end