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
iv
gitlab-ce
Commits
c7a64311
Commit
c7a64311
authored
Apr 10, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanup gfm tests
parent
f77918c3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
72 deletions
+3
-72
spec/features/gitlab_flavored_markdown_spec.rb
spec/features/gitlab_flavored_markdown_spec.rb
+3
-72
No files found.
spec/features/gitlab_flavored_markdown_spec.rb
View file @
c7a64311
...
@@ -11,29 +11,10 @@ describe "Gitlab Flavored Markdown" do
...
@@ -11,29 +11,10 @@ describe "Gitlab Flavored Markdown" do
end
end
before
do
before
do
# add test branch
Commit
.
any_instance
.
stub
(
title:
"fix #
#{
issue
.
id
}
\n\n
ask @
#{
fred
.
username
}
for details"
)
@branch_name
=
"gfm-test"
r
=
project
.
repo
i
=
r
.
index
# add test file
@test_file
=
"gfm_test_file"
i
.
add
(
@test_file
,
"foo
\n
bar
\n
"
)
# add commit with gfm
i
.
commit
(
"fix #
#{
issue
.
id
}
\n\n
ask @
#{
fred
.
username
}
for details"
,
head:
@branch_name
)
# add test tag
@tag_name
=
"gfm-test-tag"
r
.
git
.
native
(
:tag
,
{},
@tag_name
,
commit
.
id
)
end
after
do
# delete test branch and tag
project
.
repo
.
git
.
native
(
:branch
,
{
D
:
true
},
@branch_name
)
project
.
repo
.
git
.
native
(
:tag
,
{
d:
true
},
@tag_name
)
project
.
repo
.
gc_auto
end
end
let
(
:commit
)
{
project
.
repository
.
commit
s
(
@branch_name
).
first
}
let
(
:commit
)
{
project
.
repository
.
commit
}
before
do
before
do
login_as
:user
login_as
:user
...
@@ -42,7 +23,7 @@ describe "Gitlab Flavored Markdown" do
...
@@ -42,7 +23,7 @@ describe "Gitlab Flavored Markdown" do
describe
"for commits"
do
describe
"for commits"
do
it
"should render title in commits#index"
do
it
"should render title in commits#index"
do
visit
project_commits_path
(
project
,
@branch_name
,
limit:
1
)
visit
project_commits_path
(
project
,
'master'
,
limit:
1
)
page
.
should
have_link
(
"#
#{
issue
.
id
}
"
)
page
.
should
have_link
(
"#
#{
issue
.
id
}
"
)
end
end
...
@@ -59,23 +40,6 @@ describe "Gitlab Flavored Markdown" do
...
@@ -59,23 +40,6 @@ describe "Gitlab Flavored Markdown" do
page
.
should
have_link
(
"@
#{
fred
.
username
}
"
)
page
.
should
have_link
(
"@
#{
fred
.
username
}
"
)
end
end
it
"should render title in refs#tree"
,
js:
true
do
visit
project_tree_path
(
project
,
@branch_name
)
within
(
".tree_commit"
)
do
page
.
should
have_link
(
"#
#{
issue
.
id
}
"
)
end
end
# @wip
#it "should render title in refs#blame" do
#visit project_blame_path(project, File.join(@branch_name, @test_file))
#within(".blame_commit") do
#page.should have_link("##{issue.id}")
#end
#end
it
"should render title in repositories#branches"
do
it
"should render title in repositories#branches"
do
visit
branches_project_repository_path
(
project
)
visit
branches_project_repository_path
(
project
)
...
@@ -164,37 +128,4 @@ describe "Gitlab Flavored Markdown" do
...
@@ -164,37 +128,4 @@ describe "Gitlab Flavored Markdown" do
page
.
should
have_link
(
"@
#{
fred
.
username
}
"
)
page
.
should
have_link
(
"@
#{
fred
.
username
}
"
)
end
end
end
end
describe
"for notes"
do
it
"should render in commits#show"
,
js:
true
do
visit
project_commit_path
(
project
,
commit
)
within
".new_note.js-main-target-form"
do
fill_in
"note_note"
,
with:
"see #
#{
issue
.
id
}
"
click_button
"Add Comment"
end
page
.
should
have_link
(
"#
#{
issue
.
id
}
"
)
end
it
"should render in issue#show"
,
js:
true
do
visit
project_issue_path
(
project
,
issue
)
within
".new_note.js-main-target-form"
do
fill_in
"note_note"
,
with:
"see #
#{
issue
.
id
}
"
click_button
"Add Comment"
end
page
.
should
have_link
(
"#
#{
issue
.
id
}
"
)
end
it
"should render in merge_request#show"
,
js:
true
do
visit
project_merge_request_path
(
project
,
merge_request
)
within
".new_note.js-main-target-form"
do
fill_in
"note_note"
,
with:
"see #
#{
issue
.
id
}
"
click_button
"Add Comment"
end
page
.
should
have_link
(
"#
#{
issue
.
id
}
"
)
end
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