fixed test spec and remove uncessary test files

This commit is contained in:
Min Zeya Phyo
2017-03-24 21:50:01 +06:30
parent a247cd44eb
commit 75db4dbc26
7 changed files with 7 additions and 20 deletions

View File

@@ -1,4 +0,0 @@
class Api::Restaurant::ZoneController < ApplicationController
def index
end
end

View File

@@ -0,0 +1,5 @@
class Api::Restaurant::ZonesController < ActionController::API
def index
render json: Zone.where("is_active = true")
end
end

View File

@@ -1,2 +0,0 @@
<h1>Api::Restaurant::Zone#index</h1>
<p>Find me in app/views/api/restaurant/zone/index.html.erb</p>

View File

@@ -1,7 +1,7 @@
Rails.application.routes.draw do Rails.application.routes.draw do
namespace :api do namespace :api, :defaults => { :format => 'json' } do
namespace :restaurant do namespace :restaurant do
get 'zone/index' get 'zones' => "zones#index"
end end
end end

View File

@@ -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