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
7fd3a588
Commit
7fd3a588
authored
Apr 28, 2017
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed spec to a view spec
parent
06473943
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
45 additions
and
23 deletions
+45
-23
container_spec.rb
spec/features/projects/commit/container_spec.rb
+0
-23
show.html.haml_spec.rb
spec/views/projects/commit/show.html.haml_spec.rb
+45
-0
No files found.
spec/features/projects/commit/container_spec.rb
deleted
100644 → 0
View file @
06473943
require
'spec_helper'
describe
'Commit container'
,
:js
,
:feature
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:project
)
}
before
do
project
.
team
<<
[
user
,
:master
]
login_as
(
user
)
end
it
'keeps container-limited when view type is inline'
do
visit
namespace_project_commit_path
(
project
.
namespace
,
project
,
project
.
commit
.
id
,
view: :inline
)
expect
(
page
).
not_to
have_selector
(
'.limit-container-width'
)
end
it
'diff spans full width when view type is parallel'
do
visit
namespace_project_commit_path
(
project
.
namespace
,
project
,
project
.
commit
.
id
,
view: :parallel
)
expect
(
page
).
to
have_selector
(
'.limit-container-width'
)
end
end
spec/views/projects/commit/show.html.haml_spec.rb
0 → 100644
View file @
7fd3a588
require
'spec_helper'
describe
'projects/commit/show.html.haml'
,
:view
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:project
,
:repository
)
}
before
do
assign
(
:project
,
project
)
assign
(
:repository
,
project
.
repository
)
assign
(
:commit
,
project
.
commit
)
assign
(
:noteable
,
project
.
commit
)
assign
(
:notes
,
[])
assign
(
:diffs
,
project
.
commit
.
diffs
)
allow
(
view
).
to
receive
(
:current_user
).
and_return
(
user
)
allow
(
view
).
to
receive
(
:can?
).
and_return
(
false
)
allow
(
view
).
to
receive
(
:can_collaborate_with_project?
).
and_return
(
false
)
allow
(
view
).
to
receive
(
:current_ref
).
and_return
(
project
.
repository
.
root_ref
)
allow
(
view
).
to
receive
(
:diff_btn
).
and_return
(
''
)
end
context
'inline diff view'
do
before
do
allow
(
view
).
to
receive
(
:diff_view
).
and_return
(
:inline
)
render
end
it
'keeps container-limited'
do
expect
(
rendered
).
not_to
have_selector
(
'.limit-container-width'
)
end
end
context
'parallel diff view'
do
before
do
allow
(
view
).
to
receive
(
:diff_view
).
and_return
(
:parallel
)
render
end
it
'spans full width'
do
expect
(
rendered
).
to
have_selector
(
'.limit-container-width'
)
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