menu and menu_category

This commit is contained in:
Min Zeya Phyo
2017-03-27 22:09:16 +06:30
parent 75db4dbc26
commit 40423c12d3
18 changed files with 144 additions and 9 deletions

View File

@@ -0,0 +1,25 @@
require 'rails_helper'
RSpec.describe 'Seat Table API', type: :request do
# initialize test data
let!(:seat_table) { create_list(:seat_table, 10) }
let(:seat_table_id) { seat_tables.first.id }
# Test suite for GET /todos
describe 'GET /api/restaurant/seat_tables' do
# make HTTP get request before each example
before { get '/api/restaurant/seat_tables' }
it 'returns Seat Tables' do
# Note `json` is a custom helper to parse JSON responses
expect(json).not_to be_empty
expect(json.size).to eq(10)
end
it 'returns status code 200' do
expect(response).to have_http_status(200)
end
end
end