fixed test spec and remove uncessary test files
This commit is contained in:
@@ -1,4 +0,0 @@
|
||||
class Api::Restaurant::ZoneController < ApplicationController
|
||||
def index
|
||||
end
|
||||
end
|
||||
5
app/controllers/api/restaurant/zones_controller.rb
Normal file
5
app/controllers/api/restaurant/zones_controller.rb
Normal file
@@ -0,0 +1,5 @@
|
||||
class Api::Restaurant::ZonesController < ActionController::API
|
||||
def index
|
||||
render json: Zone.where("is_active = true")
|
||||
end
|
||||
end
|
||||
@@ -1,2 +0,0 @@
|
||||
<h1>Api::Restaurant::Zone#index</h1>
|
||||
<p>Find me in app/views/api/restaurant/zone/index.html.erb</p>
|
||||
@@ -1,7 +1,7 @@
|
||||
Rails.application.routes.draw do
|
||||
namespace :api do
|
||||
namespace :api, :defaults => { :format => 'json' } do
|
||||
namespace :restaurant do
|
||||
get 'zone/index'
|
||||
get 'zones' => "zones#index"
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe Api::Restaurant::ZoneController, type: :controller do
|
||||
|
||||
describe "GET #index" do
|
||||
it "returns http success" do
|
||||
get :index
|
||||
expect(response).to have_http_status(:success)
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
Reference in New Issue
Block a user