Skip to content

feature: add step#22

Open
ireznice wants to merge 1 commit intoAVGTechnologies:masterfrom
ireznice:add_step2
Open

feature: add step#22
ireznice wants to merge 1 commit intoAVGTechnologies:masterfrom
ireznice:add_step2

Conversation

@ireznice
Copy link
Copy Markdown

No description provided.

duplicates = job_record.values.select { |obj| obj['added_step'] == true && obj['name'] == added_step_name }

raise AddStepException,
"Step #{added_step_name} was already added, cannot be added twice." if duplicates.count > 0
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can use .any? for check

obj['position'].to_i if obj['class_position'] && obj['class_position'] == class_index
end.compact.max

raise AddStepException, "Invalid class_name: #{class_name}" if items.count < 1
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can use .empty? for check

end.to raise_error (Travis::GuestAPI::Cache::AddStepException)
end

it 'raises exception when step name is already present in cache' do
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this test is testing job scope?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants