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
585c4866
Commit
585c4866
authored
May 15, 2019
by
Luke Bennett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Resolve CE/EE diffs in _flash_messages
Part of single codebase changes.
parent
7dc29e9c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
27 deletions
+25
-27
app/views/projects/_flash_messages.html.haml
app/views/projects/_flash_messages.html.haml
+1
-2
ee/app/views/projects/_above_size_limit_warning.html.haml
ee/app/views/projects/_above_size_limit_warning.html.haml
+3
-2
ee/spec/controllers/projects_controller_spec.rb
ee/spec/controllers/projects_controller_spec.rb
+21
-0
spec/controllers/projects_controller_spec.rb
spec/controllers/projects_controller_spec.rb
+0
-23
No files found.
app/views/projects/_flash_messages.html.haml
View file @
585c4866
...
...
@@ -8,5 +8,4 @@
=
render
'shared/shared_runners_minutes_limit'
,
project:
project
-
unless
project
.
empty_repo?
=
render
'shared/auto_devops_implicitly_enabled_banner'
,
project:
project
-
if
project
.
above_size_limit?
=
render
'above_size_limit_warning'
=
render_if_exists
'projects/above_size_limit_warning'
,
project:
project
ee/app/views/projects/_above_size_limit_warning.html.haml
View file @
585c4866
.alert.alert-warning.d-none.d-sm-block
=
project_above_size_limit_message
-
if
project
.
above_size_limit?
.alert.alert-warning.d-none.d-sm-block
=
project_above_size_limit_message
ee/spec/controllers/projects_controller_spec.rb
View file @
585c4866
...
...
@@ -9,6 +9,27 @@ describe ProjectsController do
sign_in
(
user
)
end
describe
"GET show"
do
let
(
:public_project
)
{
create
(
:project
,
:public
,
:repository
)
}
render_views
it
'shows the over size limit warning message if above_size_limit'
do
allow_any_instance_of
(
EE
::
Project
).
to
receive
(
:above_size_limit?
).
and_return
(
true
)
allow
(
controller
).
to
receive
(
:current_user
).
and_return
(
user
)
get
:show
,
params:
{
namespace_id:
public_project
.
namespace
.
path
,
id:
public_project
.
path
}
expect
(
response
.
body
).
to
match
(
/The size of this repository.+exceeds the limit/
)
end
it
'does not show an over size warning if not above_size_limit'
do
get
:show
,
params:
{
namespace_id:
public_project
.
namespace
.
path
,
id:
public_project
.
path
}
expect
(
response
.
body
).
not_to
match
(
/The size of this repository.+exceeds the limit/
)
end
end
describe
'POST create'
do
let!
(
:params
)
do
{
...
...
spec/controllers/projects_controller_spec.rb
View file @
585c4866
...
...
@@ -237,29 +237,6 @@ describe ProjectsController do
get
:show
,
params:
{
namespace_id:
public_project
.
namespace
,
id:
public_project
}
expect
(
response
).
to
render_template
(
'_readme'
)
end
context
'project repo over limit'
do
before
do
allow_any_instance_of
(
EE
::
Project
)
.
to
receive
(
:above_size_limit?
).
and_return
(
true
)
project
.
add_maintainer
(
user
)
end
it
'shows the over size limit warning message for project members'
do
allow
(
controller
).
to
receive
(
:current_user
).
and_return
(
user
)
get
:show
,
params:
{
namespace_id:
public_project
.
namespace
.
path
,
id:
public_project
.
path
}
expect
(
response
).
to
render_template
(
'_above_size_limit_warning'
)
end
it
'does not show the message for non members'
do
get
:show
,
params:
{
namespace_id:
public_project
.
namespace
.
path
,
id:
public_project
.
path
}
expect
(
response
).
not_to
render_template
(
'_above_size_limit_warning'
)
end
end
end
context
"when the url contains .atom"
do
...
...
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