Commit b9e60275 by ivan Lan

Fix manager_auth

parent d1166a9a
......@@ -55,13 +55,13 @@ RSpec.describe "#{namespace}/orders", type: :request, capture_examples: true, ta
produces 'application/json'
consumes 'application/json'
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
response(200, description: 'filter by status') do
before { @orders.last.pay! }
let(:status) { 'paid' }
it { expect(JSON.parse(response.body)['orders'].count).to eq(1) }
before { @order_1.pay! }
let(:status) { 'unpaid' }
it { expect(JSON.parse(response.body)['orders'].count).to eq(0) }
end
end
......
......@@ -5,7 +5,6 @@ module Shotengai
self.base_resources = ::Order
self.template_dir = 'shotengai/merchant/orders/'
before_action :manager_auth
remove_actions :create, :destroy
def default_query resources
......
......@@ -5,7 +5,6 @@ module Shotengai
self.base_resources = ProductSeries
self.template_dir = 'shotengai/merchant/series/'
before_action :manager_auth
skip_before_action :set_resource, only: :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