add posts scope filter
This commit is contained in:
@@ -1,17 +1,5 @@
|
||||
require 'rails_helper'
|
||||
|
||||
# This spec was generated by rspec-rails when you ran the scaffold generator.
|
||||
# It demonstrates how one might use RSpec to test the controller code that
|
||||
# was generated by Rails when you ran the scaffold generator.
|
||||
#
|
||||
# It assumes that the implementation code is generated by the rails scaffold
|
||||
# generator. If you are using any extension libraries to generate different
|
||||
# controller code, this generated spec may or may not pass.
|
||||
#
|
||||
# It only uses APIs available in rails and/or rspec-rails. There are a number
|
||||
# of tools you can use to make these specs even more expressive, but we're
|
||||
# sticking to rails and rspec-rails APIs to keep things simple and stable.
|
||||
|
||||
RSpec.describe "/posts", type: :request do
|
||||
let(:user) { create(:user) }
|
||||
|
||||
@@ -27,10 +15,6 @@ RSpec.describe "/posts", type: :request do
|
||||
}
|
||||
}
|
||||
|
||||
# This should return the minimal set of values that should be in the headers
|
||||
# in order to pass any filters (e.g. authentication) defined in
|
||||
# PostsController, or in your router and rack
|
||||
# middleware. Be sure to keep this updated too.
|
||||
let(:valid_headers) {
|
||||
{
|
||||
Cookie: "user_id=#{user.id}"
|
||||
|
||||
Reference in New Issue
Block a user