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
097e43aa
Commit
097e43aa
authored
Jan 17, 2020
by
Scott Stern
Committed by
Dylan Griffith
Jan 17, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix license for wrk in prog limit in boards
parent
ecfa56a4
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
61 additions
and
1 deletion
+61
-1
ee/app/controllers/concerns/ee/boards_actions.rb
ee/app/controllers/concerns/ee/boards_actions.rb
+1
-1
ee/spec/controllers/groups/boards_controller_spec.rb
ee/spec/controllers/groups/boards_controller_spec.rb
+5
-0
ee/spec/controllers/projects/boards_controller_spec.rb
ee/spec/controllers/projects/boards_controller_spec.rb
+5
-0
ee/spec/support/shared_examples/controllers/boards_actions.rb
...pec/support/shared_examples/controllers/boards_actions.rb
+50
-0
No files found.
ee/app/controllers/concerns/ee/boards_actions.rb
View file @
097e43aa
...
...
@@ -11,7 +11,7 @@ module EE
private
def
push_wip_limits
push_frontend_feature_flag
(
:wip_limits
,
parent
)
if
License
.
feature_available?
(
:wip_limits
)
push_frontend_feature_flag
(
:wip_limits
,
parent
)
if
parent
.
feature_available?
(
:wip_limits
)
end
end
end
ee/spec/controllers/groups/boards_controller_spec.rb
View file @
097e43aa
...
...
@@ -47,6 +47,11 @@ describe Groups::BoardsController do
let
(
:parent
)
{
group
}
end
it_behaves_like
'pushes wip limits to frontend'
do
let
(
:params
)
{
{
group_id:
group
}
}
let
(
:parent
)
{
group
}
end
def
list_boards
(
format: :html
)
get
:index
,
params:
{
group_id:
group
},
format:
format
end
...
...
ee/spec/controllers/projects/boards_controller_spec.rb
View file @
097e43aa
...
...
@@ -25,6 +25,11 @@ describe Projects::BoardsController do
end
it_behaves_like
'redirects to last visited board'
it_behaves_like
'pushes wip limits to frontend'
do
let
(
:parent
)
{
project
}
let
(
:params
)
{
{
namespace_id:
parent
.
namespace
,
project_id:
parent
}
}
end
end
describe
'GET recent'
do
...
...
ee/spec/support/shared_examples/controllers/boards_actions.rb
0 → 100644
View file @
097e43aa
# frozen_string_literal: true
require
'spec_helper'
shared_examples
'pushes wip limits to frontend'
do
let
(
:plan_license
)
{
:free_plan
}
let
(
:group
)
{
create
(
:group
,
plan:
plan_license
)
}
let
(
:global_license
)
{
create
(
:license
)
}
before
do
allow
(
License
).
to
receive
(
:current
).
and_return
(
global_license
)
end
context
'self-hosted with correct license'
do
let
(
:plan_license
)
{
:bronze_plan
}
it
'is enabled for all groups if the license is correct'
do
expect
(
subject
).
to
receive
(
:push_frontend_feature_flag
).
at_least
(
:once
)
get
:index
,
params:
params
end
end
context
'on .com'
do
before
do
enable_namespace_license_check!
end
context
'for group with correct plan'
do
before
do
namespace
=
parent
.
is_a?
(
Group
)
?
parent
:
parent
.
namespace
namespace
.
plan
=
create
(
:bronze_plan
)
end
it
'is enabled'
do
expect
(
subject
).
to
receive
(
:push_frontend_feature_flag
).
at_least
(
:once
)
get
:index
,
params:
params
end
end
context
'for group with incorrect or no plan'
do
it
'is not enabled'
do
expect
(
subject
).
not_to
receive
(
:push_frontend_feature_flag
).
with
(
:wip_limits
,
anything
)
get
:index
,
params:
params
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