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
0
Merge Requests
0
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
Léo-Paul Géneau
gitlab-ce
Commits
f6e5cc3c
Commit
f6e5cc3c
authored
Sep 20, 2016
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a view spec for projects/notes/_form
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
929ff01a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
16 deletions
+36
-16
spec/features/projects/commits/note_spec.rb
spec/features/projects/commits/note_spec.rb
+0
-16
spec/views/projects/notes/_form.html.haml_spec.rb
spec/views/projects/notes/_form.html.haml_spec.rb
+36
-0
No files found.
spec/features/projects/commits/note_spec.rb
deleted
100644 → 0
View file @
929ff01a
require
'spec_helper'
describe
'Projects > Commits > Note'
do
let
(
:project
)
{
create
(
:project
)
}
let
(
:commit
)
{
project
.
commit
(
'7d3b0f7cff5f37573aea97cebfd5692ea1689924'
)
}
before
do
login_as
:user
project
.
team
<<
[
@user
,
:master
]
visit
namespace_project_commit_path
(
project
.
namespace
,
project
,
commit
.
id
)
end
it
'says that only markdown is supported, not slash commands'
do
expect
(
page
).
to
have_content
(
'Styling with Markdown is supported'
)
end
end
spec/views/projects/notes/_form.html.haml_spec.rb
0 → 100644
View file @
f6e5cc3c
require
'spec_helper'
describe
'projects/notes/_form'
do
include
Devise
::
TestHelpers
let
(
:user
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:empty_project
)
}
before
do
project
.
team
<<
[
user
,
:master
]
assign
(
:project
,
project
)
assign
(
:note
,
note
)
allow
(
view
).
to
receive
(
:current_user
).
and_return
(
user
)
render
end
%w[issue merge_request]
.
each
do
|
noteable
|
context
"with a note on
#{
noteable
}
"
do
let
(
:note
)
{
build
(
:"note_on_
#{
noteable
}
"
,
project:
project
)
}
it
'says that only markdown is supported, not slash commands'
do
expect
(
rendered
).
to
have_content
(
'Styling with Markdown and slash commands are supported'
)
end
end
end
context
'with a note on a commit'
do
let
(
:note
)
{
build
(
:note_on_commit
,
project:
project
)
}
it
'says that only markdown is supported, not slash commands'
do
expect
(
rendered
).
to
have_content
(
'Styling with Markdown is supported'
)
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