BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
0df0c4c4
Commit
0df0c4c4
authored
Apr 24, 2017
by
Sean McGivern
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dz-fix-spec-filenames-ce' into 'master'
Fix incorrect spec filenames which were ingored by CI See merge request !10875
parents
65152cb3
1f3b410b
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
46 additions
and
51 deletions
+46
-51
builds_controller_spec.rb
spec/controllers/projects/builds_controller_spec.rb
+40
-0
builds_controller_specs.rb
spec/controllers/projects/builds_controller_specs.rb
+0
-47
create_issue_for_single_discussion_in_merge_request_spec.rb
...eate_issue_for_single_discussion_in_merge_request_spec.rb
+3
-3
user_posts_notes_spec.rb
spec/features/merge_requests/user_posts_notes_spec.rb
+0
-0
other_markup_spec.rb
spec/lib/gitlab/other_markup_spec.rb
+3
-1
No files found.
spec/controllers/projects/builds_controller_spec.rb
View file @
0df0c4c4
...
...
@@ -63,4 +63,44 @@ describe Projects::BuildsController do
expect
(
json_response
[
'favicon'
]).
to
eq
"/assets/ci_favicons/
#{
status
.
favicon
}
.ico"
end
end
describe
'GET trace.json'
do
let
(
:pipeline
)
{
create
(
:ci_pipeline
,
project:
project
)
}
let
(
:build
)
{
create
(
:ci_build
,
pipeline:
pipeline
)
}
let
(
:user
)
{
create
(
:user
)
}
context
'when user is logged in as developer'
do
before
do
project
.
add_developer
(
user
)
sign_in
(
user
)
get_trace
end
it
'traces build log'
do
expect
(
response
).
to
have_http_status
(
:ok
)
expect
(
json_response
[
'id'
]).
to
eq
build
.
id
expect
(
json_response
[
'status'
]).
to
eq
build
.
status
end
end
context
'when user is logged in as non member'
do
before
do
sign_in
(
user
)
get_trace
end
it
'traces build log'
do
expect
(
response
).
to
have_http_status
(
:ok
)
expect
(
json_response
[
'id'
]).
to
eq
build
.
id
expect
(
json_response
[
'status'
]).
to
eq
build
.
status
end
end
def
get_trace
get
:trace
,
namespace_id:
project
.
namespace
,
project_id:
project
,
id:
build
.
id
,
format: :json
end
end
end
spec/controllers/projects/builds_controller_specs.rb
deleted
100644 → 0
View file @
65152cb3
require
'spec_helper'
describe
Projects
::
BuildsController
do
include
ApiHelpers
let
(
:project
)
{
create
(
:empty_project
,
:public
)
}
describe
'GET trace.json'
do
let
(
:pipeline
)
{
create
(
:ci_pipeline
,
project:
project
)
}
let
(
:build
)
{
create
(
:ci_build
,
pipeline:
pipeline
)
}
let
(
:user
)
{
create
(
:user
)
}
context
'when user is logged in as developer'
do
before
do
project
.
add_developer
(
user
)
sign_in
(
user
)
get_trace
end
it
'traces build log'
do
expect
(
response
).
to
have_http_status
(
:ok
)
expect
(
json_response
[
'id'
]).
to
eq
build
.
id
expect
(
json_response
[
'status'
]).
to
eq
build
.
status
end
end
context
'when user is logged in as non member'
do
before
do
sign_in
(
user
)
get_trace
end
it
'traces build log'
do
expect
(
response
).
to
have_http_status
(
:ok
)
expect
(
json_response
[
'id'
]).
to
eq
build
.
id
expect
(
json_response
[
'status'
]).
to
eq
build
.
status
end
end
def
get_trace
get
:trace
,
namespace_id:
project
.
namespace
,
project_id:
project
,
id:
build
.
id
,
format: :json
end
end
end
spec/features/issues/create_issue_for_single_discussion_in_merge_request.rb
→
spec/features/issues/create_issue_for_single_discussion_in_merge_request
_spec
.rb
View file @
0df0c4c4
...
...
@@ -4,7 +4,7 @@ feature 'Resolve an open discussion in a merge request by creating an issue', fe
let
(
:user
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:project
,
only_allow_merge_if_all_discussions_are_resolved:
true
)
}
let
(
:merge_request
)
{
create
(
:merge_request
,
source_project:
project
)
}
let!
(
:discussion
)
{
Discussion
.
for_diff_notes
([
create
(
:diff_note_on_merge_request
,
noteable:
merge_request
,
project:
project
)]).
first
}
let!
(
:discussion
)
{
create
(
:diff_note_on_merge_request
,
noteable:
merge_request
,
project:
project
).
to_discussion
}
describe
'As a user with access to the project'
do
before
do
...
...
@@ -74,8 +74,8 @@ feature 'Resolve an open discussion in a merge request by creating an issue', fe
it
'Shows a notice to ask someone else to resolve the discussions'
do
expect
(
page
).
to
have_content
(
"The discussion at
#{
merge_request
.
to_reference
}
"
\
"(discussion
#{
discussion
.
first_note
.
id
}
) will stay unresolved."
\
"Ask someone with permission to resolve it."
)
"
(discussion
#{
discussion
.
first_note
.
id
}
) will stay unresolved."
\
"
Ask someone with permission to resolve it."
)
end
end
end
spec/features/merge_requests/user_posts_notes.rb
→
spec/features/merge_requests/user_posts_notes
_spec
.rb
View file @
0df0c4c4
File moved
spec/lib/gitlab/other_markup.rb
→
spec/lib/gitlab/other_markup
_spec
.rb
View file @
0df0c4c4
require
'spec_helper'
describe
Gitlab
::
OtherMarkup
,
lib:
true
do
let
(
:context
)
{
{}
}
context
"XSS Checks"
do
links
=
{
'links'
=>
{
file:
'file.rdoc'
,
input:
'XSS[JaVaScriPt:alert(1)]'
,
output:
'<p><a>XSS</a></p>'
output:
"
\n
"
+
'<p><a>XSS</a></p>'
+
"
\n
"
}
}
links
.
each
do
|
name
,
data
|
...
...
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