spec/lib/appsignal/capistrano2_spec.rb in appsignal-2.4.0.alpha.1 vs spec/lib/appsignal/capistrano2_spec.rb in appsignal-2.4.0

- old
+ new

@@ -150,9 +150,23 @@ "Notifying AppSignal of deploy with: revision: abc123, user: batman", "AppSignal has been notified of this deploy!" end end + context "with overridden deploy user" do + before do + capistrano_config.set(:appsignal_user, "robin") + stub_marker_request(:user => "robin").to_return(:status => 200) + run + end + + it "transmits the overriden deploy user" do + expect(output).to include \ + "Notifying AppSignal of deploy with: revision: 503ce0923ed177a3ce000005, user: robin", + "AppSignal has been notified of this deploy!" + end + end + context "with failed request" do before do stub_marker_request.to_return(:status => 500) run end