summaryrefslogtreecommitdiff
path: root/spec/controllers/api/v1/tutorials_controller_spec.rb
diff options
context:
space:
mode:
authormo <mo.khan@gmail.com>2017-09-23 09:13:29 -0600
committermo <mo.khan@gmail.com>2017-09-23 09:13:29 -0600
commitafc870216e5eb02c1c73ed018d21ec2d027db041 (patch)
tree6c96a7d40c31a131f10e2da702afc4e685d17381 /spec/controllers/api/v1/tutorials_controller_spec.rb
parent49ee70b30b2e114622f90bcf77ded003908006aa (diff)
upgrade specs
Diffstat (limited to 'spec/controllers/api/v1/tutorials_controller_spec.rb')
-rw-r--r--spec/controllers/api/v1/tutorials_controller_spec.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/controllers/api/v1/tutorials_controller_spec.rb b/spec/controllers/api/v1/tutorials_controller_spec.rb
index d1e9a749..b32cebfd 100644
--- a/spec/controllers/api/v1/tutorials_controller_spec.rb
+++ b/spec/controllers/api/v1/tutorials_controller_spec.rb
@@ -13,7 +13,7 @@ describe Api::V1::TutorialsController do
let!(:other_tutorial) { create(:tutorial) }
it "returns the users tutorials" do
- xhr :get, :index
+ get :index, xhr: true
expect(assigns(:tutorials)).to match_array([my_tutorial])
end
end
@@ -27,7 +27,7 @@ describe Api::V1::TutorialsController do
description: "Connect with your friends - and other fascinating people",
tags: "cake,cookie",
}
- xhr :post, :create, tutorial: attributes
+ post :create, params: { tutorial: attributes }, xhr: true
expect(assigns(:tutorial)).to be_present
expect(assigns(:tutorial).url).to eql(attributes[:url])