Commit b9e60275 by ivan Lan

Fix manager_auth

parent d1166a9a
...@@ -55,13 +55,13 @@ RSpec.describe "#{namespace}/orders", type: :request, capture_examples: true, ta ...@@ -55,13 +55,13 @@ RSpec.describe "#{namespace}/orders", type: :request, capture_examples: true, ta
produces 'application/json' produces 'application/json'
consumes 'application/json' consumes 'application/json'
response(200, description: 'successful') do response(200, description: 'successful') do
it { expect(JSON.parse(response.body)['orders'].count).to eq(3) } it { expect(JSON.parse(response.body)['orders'].count).to eq(1) }
end end
response(200, description: 'filter by status') do response(200, description: 'filter by status') do
before { @orders.last.pay! } before { @order_1.pay! }
let(:status) { 'paid' } let(:status) { 'unpaid' }
it { expect(JSON.parse(response.body)['orders'].count).to eq(1) } it { expect(JSON.parse(response.body)['orders'].count).to eq(0) }
end end
end end
......
...@@ -5,7 +5,6 @@ module Shotengai ...@@ -5,7 +5,6 @@ module Shotengai
self.base_resources = ::Order self.base_resources = ::Order
self.template_dir = 'shotengai/merchant/orders/' self.template_dir = 'shotengai/merchant/orders/'
before_action :manager_auth
remove_actions :create, :destroy remove_actions :create, :destroy
def default_query resources def default_query resources
......
...@@ -5,7 +5,6 @@ module Shotengai ...@@ -5,7 +5,6 @@ module Shotengai
self.base_resources = ProductSeries self.base_resources = ProductSeries
self.template_dir = 'shotengai/merchant/series/' self.template_dir = 'shotengai/merchant/series/'
before_action :manager_auth
skip_before_action :set_resource, only: :batch_event skip_before_action :set_resource, only: :batch_event
# add_actions :batch_event # add_actions :batch_event
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment