Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aruna && Monalisa #7

Open
wants to merge 34 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
90eb69d
Intial set up
MonalisaC May 7, 2018
8ca9539
created movie model
aruna79 May 7, 2018
60708c8
created models
aruna79 May 7, 2018
855dace
Add controllers
MonalisaC May 7, 2018
604e3df
Add routes
MonalisaC May 7, 2018
f8ac74d
adding tests for models
aruna79 May 7, 2018
3bc954b
add validations
MonalisaC May 7, 2018
6fa399b
merge
MonalisaC May 7, 2018
083604d
added customer model tests
aruna79 May 7, 2018
44d02e9
some test
MonalisaC May 7, 2018
23f9b2f
Merge branch 'master' of https://github.com/aruna79/VideoStoreAPI
MonalisaC May 7, 2018
f8c4eec
schema error
MonalisaC May 7, 2018
388bf3d
Add test for movie model
MonalisaC May 7, 2018
f27dd84
customer model tests passing
aruna79 May 7, 2018
d4ebaa0
Merge branch 'master' of https://github.com/aruna79/VideoStoreAPI
aruna79 May 7, 2018
8ee1a00
Add rental model test
MonalisaC May 7, 2018
7877cff
Merge branch 'master' of https://github.com/aruna79/VideoStoreAPI
aruna79 May 7, 2018
ea1454d
added customer index method for controller
aruna79 May 8, 2018
b101950
added methods to model controller
aruna79 May 8, 2018
a35bf24
added customer controller test
aruna79 May 8, 2018
440d350
added movie controller tests
aruna79 May 8, 2018
225ed4f
tests passing for movie controller
aruna79 May 8, 2018
a8b3835
fixed error in movie controller
aruna79 May 8, 2018
737df1c
fixed typo
MonalisaC May 8, 2018
20e80e5
added rental controller
aruna79 May 8, 2018
21c72ff
Merge branch 'master' of https://github.com/aruna79/VideoStoreAPI
aruna79 May 8, 2018
9836438
fixed error in movie test
aruna79 May 8, 2018
0a361f1
add routes
MonalisaC May 9, 2018
b9eb68a
change method logic
MonalisaC May 9, 2018
a475d48
Changed fixtures
MonalisaC May 9, 2018
dc73a4f
Add tests
MonalisaC May 9, 2018
16226a4
wrote methods
MonalisaC May 9, 2018
f00ba73
fix failure
MonalisaC May 9, 2018
0c336cd
add erd
MonalisaC May 9, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add controllers
  • Loading branch information
MonalisaC committed May 7, 2018
commit 855dace928f7b9104b407fb6f2d850192ef8664a
4 changes: 4 additions & 0 deletions app/controllers/customers_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
class CustomersController < ApplicationController
def index
end
end
10 changes: 10 additions & 0 deletions app/controllers/movies_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
class MoviesController < ApplicationController
def index
end

def show
end

def create
end
end
8 changes: 8 additions & 0 deletions config/routes.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
Rails.application.routes.draw do
get 'movies/index'

get 'movies/show'

get 'movies/create'

get 'customers/index'

# For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html
end
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
class AddCustomerIdAndMovieIdToRentals < ActiveRecord::Migration[5.1]
def change

add_reference :rentals, :customer, foreign_key: true
add_reference :rentals, :movie, foreign_key: true
end
end
9 changes: 9 additions & 0 deletions test/controllers/customers_controller_test.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
require "test_helper"

describe CustomersController do
it "should get index" do
get customers_index_url
value(response).must_be :success?
end

end
19 changes: 19 additions & 0 deletions test/controllers/movies_controller_test.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
require "test_helper"

describe MoviesController do
it "should get index" do
get movies_index_url
value(response).must_be :success?
end

it "should get show" do
get movies_show_url
value(response).must_be :success?
end

it "should get create" do
get movies_create_url
value(response).must_be :success?
end

end