Fix adding pages domain to projects in groups

This commit is contained in:
Kamil Trzcinski 2016-02-23 12:03:03 +01:00 committed by James Edwards-Jones
parent 5556db0404
commit 639cf728f8
3 changed files with 16 additions and 1 deletions

View file

@ -1,4 +1,4 @@
= 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?
#error_explanation
.alert.alert-danger

View file

@ -40,6 +40,15 @@ Feature: Project Pages
And I click on "Create New Domain"
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
Given pages are enabled
And pages are exposed on external HTTP address

View file

@ -7,6 +7,12 @@ module SharedProject
@project.team << [@user, :master]
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
@group = create(:group, name: 'some group')
@project = create(:project, :repository, namespace: @group, public_builds: false)