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
aa6a580f
Commit
aa6a580f
authored
Oct 12, 2019
by
Heinrich Lee Yu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove models from parameterized test
Fixes broken master
parent
efa0c024
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
11 deletions
+37
-11
ee/spec/helpers/ee/trial_helper_spec.rb
ee/spec/helpers/ee/trial_helper_spec.rb
+37
-11
No files found.
ee/spec/helpers/ee/trial_helper_spec.rb
View file @
aa6a580f
...
@@ -6,19 +6,45 @@ describe EE::TrialHelper do
...
@@ -6,19 +6,45 @@ describe EE::TrialHelper do
using
RSpec
::
Parameterized
::
TableSyntax
using
RSpec
::
Parameterized
::
TableSyntax
describe
'#show_trial_errors?'
do
describe
'#show_trial_errors?'
do
where
(
:namespace
,
:trial_result
,
:expected_result
)
do
shared_examples
'shows errors based on trial generation result'
do
nil
|
{
success:
true
}
|
false
where
(
:trial_result
,
:expected_result
)
do
nil
|
nil
|
nil
nil
|
nil
build
(
:namespace
)
|
nil
|
nil
{
success:
true
}
|
false
build
(
:namespace
)
|
{
success:
true
}
|
false
{
success:
false
}
|
true
build
(
:namespace
,
name:
'admin'
)
|
{
success:
true
}
|
true
end
nil
|
{
success:
false
}
|
true
build
(
:namespace
)
|
{
success:
false
}
|
true
with_them
do
it
'show errors when trial generation was unsuccessful'
do
expect
(
helper
.
show_trial_errors?
(
namespace
,
trial_result
)).
to
eq
(
expected_result
)
end
end
end
context
'when namespace is nil'
do
let
(
:namespace
)
{
nil
}
it_behaves_like
'shows errors based on trial generation result'
end
end
with_them
do
context
'when namespace is valid'
do
it
'show errors when Namespace is invalid or Trial generation was unsuccessful'
do
let
(
:namespace
)
{
build
(
:namespace
)
}
expect
(
helper
.
show_trial_errors?
(
namespace
,
trial_result
)).
to
eq
(
expected_result
)
it_behaves_like
'shows errors based on trial generation result'
end
context
'when namespace is invalid'
do
let
(
:namespace
)
{
build
(
:namespace
,
name:
'admin'
)
}
where
(
:trial_result
,
:expected_result
)
do
nil
|
true
{
success:
true
}
|
true
{
success:
false
}
|
true
end
with_them
do
it
'show errors regardless of trial generation result'
do
expect
(
helper
.
show_trial_errors?
(
namespace
,
trial_result
)).
to
eq
(
expected_result
)
end
end
end
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