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
608c1ea2
Commit
608c1ea2
authored
Dec 15, 2021
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove a problematic spec file
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
7063e007
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
81 deletions
+0
-81
spec/scripts/lib/gitlab_spec.rb
spec/scripts/lib/gitlab_spec.rb
+0
-81
No files found.
spec/scripts/lib/gitlab_spec.rb
deleted
100644 → 0
View file @
7063e007
# frozen_string_literal: true
require
'fast_spec_helper'
require_relative
'../../../scripts/lib/gitlab'
RSpec
.
describe
'scripts/lib/gitlab.rb'
do
let
(
:ee_file_path
)
{
File
.
expand_path
(
'../../../ee/app/models/license.rb'
,
__dir__
)
}
describe
'.ee?'
do
before
do
stub_env
(
'FOSS_ONLY'
,
nil
)
allow
(
File
).
to
receive
(
:exist?
).
with
(
ee_file_path
)
{
true
}
end
it
'returns true when ee/app/models/license.rb exists'
do
expect
(
Gitlab
.
ee?
).
to
eq
(
true
)
end
end
describe
'.jh?'
do
context
'when jh directory exists and EE_ONLY is not set'
do
before
do
stub_env
(
'EE_ONLY'
,
nil
)
allow
(
Dir
).
to
receive
(
:exist?
).
with
(
File
.
expand_path
(
'../../../jh'
,
__dir__
))
{
true
}
end
context
'when ee/app/models/license.rb exists'
do
before
do
allow
(
File
).
to
receive
(
:exist?
).
with
(
ee_file_path
)
{
true
}
end
context
'when FOSS_ONLY is not set'
do
before
do
stub_env
(
'FOSS_ONLY'
,
nil
)
end
it
'returns true'
do
expect
(
Gitlab
.
jh?
).
to
eq
(
true
)
end
end
context
'when FOSS_ONLY is set to 1'
do
before
do
stub_env
(
'FOSS_ONLY'
,
'1'
)
end
it
'returns false'
do
expect
(
Gitlab
.
jh?
).
to
eq
(
false
)
end
end
end
context
'when ee/app/models/license.rb not exist'
do
before
do
allow
(
File
).
to
receive
(
:exist?
).
with
(
ee_file_path
)
{
false
}
end
context
'when FOSS_ONLY is not set'
do
before
do
stub_env
(
'FOSS_ONLY'
,
nil
)
end
it
'returns true'
do
expect
(
Gitlab
.
jh?
).
to
eq
(
false
)
end
end
context
'when FOSS_ONLY is set to 1'
do
before
do
stub_env
(
'FOSS_ONLY'
,
'1'
)
end
it
'returns false'
do
expect
(
Gitlab
.
jh?
).
to
eq
(
false
)
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