Welcome to mirror list, hosted at ThFree Co, Russian Federation.

organizations_controller_routing_spec.rb « organizations « routing « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: c5c7a0ae3778f818bb06758f37df4e1ca21ac845 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# frozen_string_literal: true

require 'spec_helper'

RSpec.describe Organizations::OrganizationsController, :routing, feature_category: :cell do
  let_it_be(:organization) { build(:organization) }

  it 'routes to #show' do
    expect(get("/-/organizations/#{organization.path}"))
      .to route_to('organizations/organizations#show', organization_path: organization.path)
  end

  it 'routes to #new' do
    expect(get("/-/organizations/new"))
      .to route_to('organizations/organizations#new')
  end

  it 'routes to #index' do
    expect(get("/-/organizations"))
      .to route_to('organizations/organizations#index')
  end

  it 'routes to #groups_and_projects' do
    expect(get("/-/organizations/#{organization.path}/groups_and_projects"))
      .to route_to('organizations/organizations#groups_and_projects', organization_path: organization.path)
  end

  it 'routes to #users' do
    expect(get("/-/organizations/#{organization.path}/users"))
      .to route_to('organizations/organizations#users', organization_path: organization.path)
  end

  it 'routes to #preview_markdown' do
    expect(post("/-/organizations/preview_markdown"))
      .to route_to('organizations/organizations#preview_markdown')
  end
end