Commit 00d53327 by Aman Sharma

Merge branch 'master' of 35.155.93.82:amansharma/react-rails-rspec

parents 30272646 993ccc23
...@@ -4,12 +4,13 @@ RSpec.describe "Api::V1::Employees", type: :request do ...@@ -4,12 +4,13 @@ RSpec.describe "Api::V1::Employees", type: :request do
describe "GET /index" do describe "GET /index" do
it "returns http success" do it "returns http success" do
get "/api/v1/employees/index" get("/api/v1/employees/index")
expect(response).to have_http_status(:success) # data = JSON.parse(response.body)
expect(response.status).to eq(200)
end end
end end
describe "GET /create" do describe "POST /create" do
it "returns http success" do it "returns http success" do
get "/api/v1/employees/create" get "/api/v1/employees/create"
expect(response).to have_http_status(:success) expect(response).to have_http_status(:success)
...@@ -18,15 +19,16 @@ RSpec.describe "Api::V1::Employees", type: :request do ...@@ -18,15 +19,16 @@ RSpec.describe "Api::V1::Employees", type: :request do
describe "GET /show" do describe "GET /show" do
it "returns http success" 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) expect(response).to have_http_status(:success)
end end
end end
describe "GET /destroy" do describe "DELETE /destroy" do
it "returns http success" do it "returns http success" do
get "/api/v1/employees/destroy" get "/api/v1/employees/destroy"
expect(response).to have_http_status(:success) expect(response.status).to eq(200)
end end
end end
......
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