Files
importer-issue-ops/spec/models/jenkins/migrate_spec.rb
T
2022-01-07 19:45:53 +00:00

17 lines
575 B
Ruby

# frozen_string_literal: true
RSpec.describe Jenkins::Migrate do
let(:dry_run) { described_class.new(nil, command) }
let(:command) { Command.new(comment_body) }
describe "#to_a" do
subject { dry_run.to_a }
context "when the comment body contains a pipeline id" do
let(:comment_body) { "/migrate --source-url https://jenkins.company.com/job/pipeline --target-url https://github.com/org/repo" }
it { is_expected.to eq(["--source-url", "https://jenkins.company.com/job/pipeline", "--target-url", "https://github.com/org/repo"]) }
end
end
end