spec/lib/chatops/controller_spec.rb in chatops-controller-3.1.1 vs spec/lib/chatops/controller_spec.rb in chatops-controller-4.0.0
- old
+ new
@@ -12,12 +12,12 @@
before_action :ensure_app_given, :only => [:wcid]
chatop :wcid,
/(?:where can i deploy|wcid)(?: (?<app>\S+))?/,
"where can i deploy?" do
- return jsonrpc_invalid_params("I need nope, sorry") if params[:app] == "nope"
- jsonrpc_success "You can deploy #{params["app"]} just fine."
+ return jsonrpc_invalid_params("I need nope, sorry") if jsonrpc_params[:app] == "nope"
+ jsonrpc_success "You can deploy #{jsonrpc_params["app"]} just fine."
end
chatop :foobar,
/(?:how can i foo and bar all at once)?/,
"how to foo and bar" do
@@ -33,10 +33,10 @@
def unexcluded_chatop_method
render :text => "Sadly, I'll never be reached"
end
def ensure_app_given
- return jsonrpc_invalid_params("I need an app, every time") unless params[:app].present?
+ return jsonrpc_invalid_params("I need an app, every time") unless jsonrpc_params[:app].present?
end
end
before :each do
routes.draw do