Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
react-rails-rspec
Overview
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
Aman Sharma
react-rails-rspec
Commits
aadb6ee8
Commit
aadb6ee8
authored
Oct 01, 2020
by
Vijay Gawariya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
api test case
parent
fa5c1a37
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
employees_request_spec.rb
spec/requests/api/v1/employees_request_spec.rb
+8
-6
No files found.
spec/requests/api/v1/employees_request_spec.rb
View file @
aadb6ee8
...
...
@@ -4,12 +4,13 @@ RSpec.describe "Api::V1::Employees", type: :request do
describe
"GET /index"
do
it
"returns http success"
do
get
"/api/v1/employees/index"
expect
(
response
).
to
have_http_status
(
:success
)
get
(
"/api/v1/employees/index"
)
# data = JSON.parse(response.body)
expect
(
response
.
status
).
to
eq
(
200
)
end
end
describe
"
GE
T /create"
do
describe
"
POS
T /create"
do
it
"returns http success"
do
get
"/api/v1/employees/create"
expect
(
response
).
to
have_http_status
(
:success
)
...
...
@@ -18,15 +19,16 @@ RSpec.describe "Api::V1::Employees", type: :request do
describe
"GET /show"
do
it
"returns http success"
do
get
"/api/v1/employees/show"
get
"/api/v1/employees/show/:1"
# data = JSON.parse(response.body)
expect
(
response
).
to
have_http_status
(
:success
)
end
end
describe
"
GET
/destroy"
do
describe
"
DELETE
/destroy"
do
it
"returns http success"
do
get
"/api/v1/employees/destroy"
expect
(
response
).
to
have_http_status
(
:success
)
expect
(
response
.
status
).
to
eq
(
200
)
end
end
...
...
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