spec/weeler/action_controller/acts/restful_spec.rb in weeler-1.6.0 vs spec/weeler/action_controller/acts/restful_spec.rb in weeler-2.0.0
- old
+ new
@@ -3,11 +3,11 @@
class Weeler::FoosController < Weeler::ContentController; end
describe Weeler::ActionController::Acts::Restful, type: :controller do
before(:each) do
- FactoryGirl.create_list(:dummy_post, 2)
+ FactoryBot.create_list(:dummy_post, 2)
end
before do
routes.draw do
mount_weeler_at "/weeler-admin" do
@@ -33,11 +33,11 @@
describe "GET #index" do
specify "index returns success" do
routes.draw { get "index" => "weeler/foos#index" }
get "index"
- expect(response).to be_success
+ expect(response).to have_http_status(200)
end
specify "assigns posts" do
routes.draw { get "index" => "weeler/foos#index" }
@@ -68,17 +68,18 @@
end
describe "GET #edit" do
it "returns success status" do
get "edit", params: { id: Post.last.id }
- expect(response).to be_success
+ expect(response).to have_http_status(200)
end
end
describe "GET #new" do
it "returns success status" do
get "new"
- expect(response).to be_success
+
+ expect(response).to have_http_status(200)
end
end
describe "PUT #update" do
it "sets only permited params" do