Skip to content

Commit

Permalink
Created EventSchedulesController
Browse files Browse the repository at this point in the history
  • Loading branch information
RileyManda committed Jan 25, 2024
1 parent 2805fff commit e878f99
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 0 deletions.
16 changes: 16 additions & 0 deletions app/controllers/api/v1/event_schedules_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
class Api::V1::EventSchedulesController < ApplicationController
def index
end

def show
end

def create
end

def update
end

def destroy
end
end
5 changes: 5 additions & 0 deletions config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
devise_for :users
namespace :api do
namespace :v1 do
get 'event_schedules/index'
get 'event_schedules/show'
get 'event_schedules/create'
get 'event_schedules/update'
get 'event_schedules/destroy'
resources :participants, only: [:index, :show, :create, :update, :destroy]
resources :categories, only: [:index, :show, :create, :update, :destroy]
resources :events, only: [:index, :show, :create, :update, :destroy]
Expand Down
28 changes: 28 additions & 0 deletions test/controllers/api/v1/event_schedules_controller_test.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
require "test_helper"

class Api::V1::EventSchedulesControllerTest < ActionDispatch::IntegrationTest
test "should get index" do
get api_v1_event_schedules_index_url
assert_response :success
end

test "should get show" do
get api_v1_event_schedules_show_url
assert_response :success
end

test "should get create" do
get api_v1_event_schedules_create_url
assert_response :success
end

test "should get update" do
get api_v1_event_schedules_update_url
assert_response :success
end

test "should get destroy" do
get api_v1_event_schedules_destroy_url
assert_response :success
end
end

0 comments on commit e878f99

Please sign in to comment.