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
7d483f8c
Commit
7d483f8c
authored
Jul 26, 2016
by
Douglas Barbosa Alexandre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add feature specs for edit project settings
parent
487dfad6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
0 deletions
+41
-0
spec/features/projects/project_settings_spec.rb
spec/features/projects/project_settings_spec.rb
+41
-0
No files found.
spec/features/projects/project_settings_spec.rb
0 → 100644
View file @
7d483f8c
require
'spec_helper'
describe
'Edit Project Settings'
,
feature:
true
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:empty_project
,
path:
'gitlab'
,
name:
'sample'
)
}
before
do
login_as
(
user
)
project
.
team
<<
[
user
,
:master
]
end
describe
'Project settings'
,
js:
true
do
it
'shows errors for invalid project name'
do
visit
edit_namespace_project_path
(
project
.
namespace
,
project
)
fill_in
'project_name_edit'
,
with:
'foo&bar'
click_button
'Save changes'
expect
(
page
).
to
have_field
'project_name_edit'
,
with:
'foo&bar'
expect
(
page
).
to
have_content
"Name can contain only letters, digits, '_', '.', dash and space. It must start with letter, digit or '_'."
expect
(
page
).
to
have_button
'Save changes'
end
end
describe
'Rename repository'
do
it
'shows errors for invalid project path/name'
do
visit
edit_namespace_project_path
(
project
.
namespace
,
project
)
fill_in
'Project name'
,
with:
'foo&bar'
fill_in
'Path'
,
with:
'foo&bar'
click_button
'Rename project'
expect
(
page
).
to
have_field
'Project name'
,
with:
'sample'
expect
(
page
).
to
have_field
'Path'
,
with:
'gitlab'
expect
(
page
).
to
have_content
"Name can contain only letters, digits, '_', '.', dash and space. It must start with letter, digit or '_'."
expect
(
page
).
to
have_content
"Path can contain only letters, digits, '_', '-' and '.'. Cannot start with '-', end in '.git' or end in '.atom'"
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