Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
shotengai
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open-source
shotengai
Commits
b9e60275
Commit
b9e60275
authored
Sep 26, 2017
by
ivan Lan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix manager_auth
parent
d1166a9a
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
6 deletions
+4
-6
order_spec.rb
...generators/templates/spec/requests/merchant/order_spec.rb
+4
-4
orders_controller.rb
lib/shotengai/controllers/merchant/orders_controller.rb
+0
-1
product_series_controller.rb
...otengai/controllers/merchant/product_series_controller.rb
+0
-1
No files found.
lib/generators/templates/spec/requests/merchant/order_spec.rb
View file @
b9e60275
...
...
@@ -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
{
@order
s
.
last
.
pay!
}
let
(
:status
)
{
'paid'
}
it
{
expect
(
JSON
.
parse
(
response
.
body
)[
'orders'
].
count
).
to
eq
(
1
)
}
before
{
@order
_1
.
pay!
}
let
(
:status
)
{
'
un
paid'
}
it
{
expect
(
JSON
.
parse
(
response
.
body
)[
'orders'
].
count
).
to
eq
(
0
)
}
end
end
...
...
lib/shotengai/controllers/merchant/orders_controller.rb
View file @
b9e60275
...
...
@@ -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
...
...
lib/shotengai/controllers/merchant/product_series_controller.rb
View file @
b9e60275
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment