Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
71678f08
Commit
71678f08
authored
Apr 09, 2014
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'issue_on_empty_repo' into 'master'
Fix for error 500 on create issue for empty repo
parents
e099d662
e617cf95
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
1 deletion
+31
-1
app/views/projects/issues/_form.html.haml
app/views/projects/issues/_form.html.haml
+1
-1
features/project/issues/issues.feature
features/project/issues/issues.feature
+9
-0
features/steps/project/issues.rb
features/steps/project/issues.rb
+21
-0
No files found.
app/views/projects/issues/_form.html.haml
View file @
71678f08
%div
.issue-form-holder
%div
.issue-form-holder
%h3
.page-title
=
@issue
.
new_record?
?
"New Issue"
:
"Edit Issue #
#{
@issue
.
iid
}
"
%h3
.page-title
=
@issue
.
new_record?
?
"New Issue"
:
"Edit Issue #
#{
@issue
.
iid
}
"
%hr
%hr
-
if
!
@repository
.
empty?
&&
@repository
.
contribution_guide
&&
!
@issue
.
persisted?
-
if
@repository
.
exists?
&&
!
@repository
.
empty?
&&
@repository
.
contribution_guide
&&
!
@issue
.
persisted?
-
contribution_guide_url
=
project_blob_path
(
@project
,
tree_join
(
@repository
.
root_ref
,
@repository
.
contribution_guide
.
name
))
-
contribution_guide_url
=
project_blob_path
(
@project
,
tree_join
(
@repository
.
root_ref
,
@repository
.
contribution_guide
.
name
))
.alert.alert-info.col-sm-10.col-sm-offset-2
.alert.alert-info.col-sm-10.col-sm-offset-2
=
"Please review the <strong>
#{
link_to
"guidelines for contribution"
,
contribution_guide_url
}
</strong> to this repository."
.
html_safe
=
"Please review the <strong>
#{
link_to
"guidelines for contribution"
,
contribution_guide_url
}
</strong> to this repository."
.
html_safe
...
...
features/project/issues/issues.feature
View file @
71678f08
...
@@ -67,3 +67,12 @@ Feature: Project Issues
...
@@ -67,3 +67,12 @@ Feature: Project Issues
Given
I visit issue page
"Release 0.4"
Given
I visit issue page
"Release 0.4"
And
I leave a comment with a header containing
"Comment with a header"
And
I leave a comment with a header containing
"Comment with a header"
Then
The comment with the header should not have an ID
Then
The comment with the header should not have an ID
Scenario
:
Issues on empty project
Given
empty project
"Empty Project"
When
I visit empty project page
And
I see empty project details with ssh clone info
When
I visit empty project's issues page
Given
I click link
"New Issue"
And
I submit new issue
"500 error on profile"
Then
I should see issue
"500 error on profile"
features/steps/project/issues.rb
View file @
71678f08
...
@@ -142,4 +142,25 @@ class ProjectIssues < Spinach::FeatureSteps
...
@@ -142,4 +142,25 @@ class ProjectIssues < Spinach::FeatureSteps
project:
project
,
project:
project
,
author:
project
.
users
.
first
)
author:
project
.
users
.
first
)
end
end
Given
'empty project "Empty Project"'
do
create
:empty_project
,
name:
'Empty Project'
,
namespace:
@user
.
namespace
end
When
'I visit empty project page'
do
project
=
Project
.
find_by
(
name:
'Empty Project'
)
visit
project_path
(
project
)
end
And
'I see empty project details with ssh clone info'
do
project
=
Project
.
find_by
(
name:
'Empty Project'
)
page
.
all
(
:css
,
'.git-empty .clone'
).
each
do
|
element
|
element
.
text
.
should
include
(
project
.
url_to_repo
)
end
end
When
"I visit empty project's issues page"
do
project
=
Project
.
find_by
(
name:
'Empty Project'
)
visit
project_issues_path
(
project
)
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment