spec/gush/client_spec.rb in gush-0.3.1 vs spec/gush/client_spec.rb in gush-0.3.2
- old
+ new
@@ -13,15 +13,26 @@
}.to raise_error(Gush::WorkflowNotFound)
end
end
context "when given workflow exists" do
+
it "returns Workflow object" do
expected_workflow = TestWorkflow.create
workflow = client.find_workflow(expected_workflow.id)
expect(workflow.id).to eq(expected_workflow.id)
expect(workflow.jobs.map(&:name)).to match_array(expected_workflow.jobs.map(&:name))
+ end
+
+ context "when workflow has parameters" do
+ it "returns Workflow object" do
+ expected_workflow = ParameterTestWorkflow.create(true)
+ workflow = client.find_workflow(expected_workflow.id)
+
+ expect(workflow.id).to eq(expected_workflow.id)
+ expect(workflow.jobs.map(&:name)).to match_array(expected_workflow.jobs.map(&:name))
+ end
end
end
end
describe "#start_workflow" do