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
e0f079b6
Commit
e0f079b6
authored
May 03, 2021
by
Rajendra Kadam
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Assert change on files
parent
42612832
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
spec/lib/generators/gitlab/snowplow_event_definition_generator_spec.rb
...rators/gitlab/snowplow_event_definition_generator_spec.rb
+4
-1
No files found.
spec/lib/generators/gitlab/snowplow_event_definition_generator_spec.rb
View file @
e0f079b6
...
@@ -40,12 +40,15 @@ RSpec.describe Gitlab::SnowplowEventDefinitionGenerator do
...
@@ -40,12 +40,15 @@ RSpec.describe Gitlab::SnowplowEventDefinitionGenerator do
it
'overwrites event definition --ff flag set to true'
do
it
'overwrites event definition --ff flag set to true'
do
sample_event
=
::
Gitlab
::
Config
::
Loader
::
Yaml
.
new
(
fixture_file
(
File
.
join
(
sample_event_dir
,
'sample_event.yml'
))).
load_raw!
sample_event
=
::
Gitlab
::
Config
::
Loader
::
Yaml
.
new
(
fixture_file
(
File
.
join
(
sample_event_dir
,
'sample_event.yml'
))).
load_raw!
sample_event
[
"label_description"
]
=
"some description"
stub_const
(
'Gitlab::VERSION'
,
'13.11.0-pre'
)
stub_const
(
'Gitlab::VERSION'
,
'13.11.0-pre'
)
described_class
.
new
([],
generator_options
.
merge
(
'ff'
=>
true
)).
invoke_all
described_class
.
new
([],
generator_options
.
merge
(
'ff'
=>
true
)).
invoke_all
event_definition_path
=
File
.
join
(
ce_temp_dir
,
'groups__email_campaigns_controller_click.yml'
)
event_definition_path
=
File
.
join
(
ce_temp_dir
,
'groups__email_campaigns_controller_click.yml'
)
expect
(
::
Gitlab
::
Config
::
Loader
::
Yaml
.
new
(
File
.
read
(
event_definition_path
)).
load_raw!
).
to
eq
(
sample_event
)
event_data
=
::
Gitlab
::
Config
::
Loader
::
Yaml
.
new
(
File
.
read
(
event_definition_path
)).
load_raw!
event_data
[
"label_description"
]
=
"some description"
expect
(
event_data
).
to
eq
(
sample_event
)
end
end
it
'raises error when --ff flag set to false'
do
it
'raises error when --ff flag set to false'
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