Commit 639cf728 authored by Kamil Trzcinski's avatar Kamil Trzcinski Committed by James Edwards-Jones

Fix adding pages domain to projects in groups

parent 5556db04
= form_for [@project.namespace, @project, @domain], html: { class: 'form-horizontal fieldset-form' } do |f| = form_for [@project.namespace.becomes(Namespace), @project, @domain], html: { class: 'form-horizontal fieldset-form' } do |f|
- if @domain.errors.any? - if @domain.errors.any?
#error_explanation #error_explanation
.alert.alert-danger .alert.alert-danger
......
...@@ -40,6 +40,15 @@ Feature: Project Pages ...@@ -40,6 +40,15 @@ Feature: Project Pages
And I click on "Create New Domain" And I click on "Create New Domain"
Then I should see a new domain added Then I should see a new domain added
Scenario: I should be able to add a new domain for project in group namespace
Given I own a project in some group namespace
And pages are enabled
And pages are exposed on external HTTP address
When I visit add a new Pages Domain
And I fill the domain
And I click on "Create New Domain"
Then I should see a new domain added
Scenario: I should be denied to add the same domain twice Scenario: I should be denied to add the same domain twice
Given pages are enabled Given pages are enabled
And pages are exposed on external HTTP address And pages are exposed on external HTTP address
......
...@@ -7,6 +7,12 @@ module SharedProject ...@@ -7,6 +7,12 @@ module SharedProject
@project.team << [@user, :master] @project.team << [@user, :master]
end end
step "I own a project in some group namespace" do
@group = create(:group, name: 'some group')
@project = create(:project, namespace: @group)
@project.team << [@user, :master]
end
step "project exists in some group namespace" do step "project exists in some group namespace" do
@group = create(:group, name: 'some group') @group = create(:group, name: 'some group')
@project = create(:project, :repository, namespace: @group, public_builds: false) @project = create(:project, :repository, namespace: @group, public_builds: false)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment