Skip to content

Commit

Permalink
Add spec to make sure that we are able to parse multiple workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
vpereira committed Sep 17, 2021
1 parent d2a8510 commit d5aef92
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@
Workflows::YAMLToWorkflowsService.new(yaml_file: workflows_yml_file, scm_webhook: ScmWebhook.new(payload: payload), token: token).call
end

context 'it supports many workflows' do
let(:workflows_yml_file) { File.expand_path(Rails.root.join('spec/support/files/multiple_workflows.yml')) }
let(:payload) { github_extractor_payload }

it { expect(subject.size).to be(2) }
end

context 'with webhook payload from gitlab' do
let(:payload) { gitlab_extractor_payload }

Expand Down
11 changes: 11 additions & 0 deletions src/api/spec/support/files/multiple_workflows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
workflow123:
steps:
- branch_package:
source_project: "test-project"
source_package: "test-package"

workflow124:
steps:
- branch_package:
source_project: "test-project"
source_package: "test-package"

0 comments on commit d5aef92

Please sign in to comment.