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

Queues - Danielle Birbal & Marisol Lopez - VideoStoreAPI #4

Open
wants to merge 33 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
7e75b26
initial rails app setup
marisol-lopez May 9, 2017
4763720
Generated Customer Model
birbalds May 9, 2017
ae9a672
movies migration, join-table migration, added account_credit
marisol-lopez May 9, 2017
399937f
added routes
marisol-lopez May 9, 2017
b23daf0
created customers controller
marisol-lopez May 9, 2017
91a286a
added controller tests
marisol-lopez May 9, 2017
dc75806
added test for customer relation
marisol-lopez May 9, 2017
1d45957
Added Movies Controller + Controller Tests
birbalds May 9, 2017
b1ddd6d
Merge branch 'moviefunkdev'
birbalds May 9, 2017
766fb6a
Merge remote-tracking branch 'origin/master'
birbalds May 9, 2017
5b5733d
created rentals model
marisol-lopez May 9, 2017
13589da
migration for rentals
marisol-lopez May 10, 2017
eeedbcd
Expirementing with rental functionality
birbalds May 10, 2017
74d35c7
Merge branch 'moviefunkdev'
birbalds May 10, 2017
25d60ba
changed rentals yml and customer relationship and test
marisol-lopez May 10, 2017
4eddd7c
updated tests for movie and customer relationships
marisol-lopez May 10, 2017
5e4f2d4
Added CheckIn and CheckOut
birbalds May 10, 2017
deac560
Merge branch 'moviefunkdev'
birbalds May 10, 2017
fa7dbcc
serializer
marisol-lopez May 10, 2017
2f7d2d0
merge conflict routes
marisol-lopez May 10, 2017
f873171
rentals overdue method
marisol-lopez May 10, 2017
6559b82
Fixed customer movie count
birbalds May 10, 2017
327973b
Merge branch 'master' of https://github.com/marisol-lopez/VideoStoreAPI
marisol-lopez May 10, 2017
7fd5aca
created methods for overdue rentals method to print out movie title, …
marisol-lopez May 10, 2017
b8d4502
Removed unnecessary line
birbalds May 10, 2017
8e713dd
tests for rental model and controller
marisol-lopez May 11, 2017
d6c3a6b
added test for rentals if there are no overdue rentals
marisol-lopez May 12, 2017
e2744f2
changed default value for checkout count fixed negative test case for…
marisol-lopez May 12, 2017
a706934
Added test + validations
birbalds May 12, 2017
ee04348
Tests for validations
birbalds May 12, 2017
acdc4ac
added error reports to movies and customers controller
marisol-lopez May 12, 2017
7aa5b7c
Merge branch 'master' of https://github.com/marisol-lopez/VideoStoreAPI
marisol-lopez May 12, 2017
72230a9
changed checkout and checkin routes
marisol-lopez May 12, 2017
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
Generated Customer Model
birbalds committed May 9, 2017

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 47637205bacba225abdf8e9d942c958fbf56bd46
3 changes: 3 additions & 0 deletions app/models/customer.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
class Customer < ApplicationRecord
has_and_belongs_to_many :movies
end
16 changes: 16 additions & 0 deletions db/migrate/20170509214809_create_customers.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
class CreateCustomers < ActiveRecord::Migration[5.0]
def change
create_table :customers do |t|
t.string :name
t.string :registered_at
t.string :postal_code
t.string :phone
t.integer :movies_checked_out_count
t.string :address
t.string :city
t.string :state

t.timestamps
end
end
end
21 changes: 21 additions & 0 deletions test/fixtures/customers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html

one:
name: MyString
registered_at: MyString
postal_code: MyString
phone: MyString
movies_checked_out_count: 1
address: MyString
city: MyString
state: MyString

two:
name: MyString
registered_at: MyString
postal_code: MyString
phone: MyString
movies_checked_out_count: 1
address: MyString
city: MyString
state: MyString
9 changes: 9 additions & 0 deletions test/models/customer_test.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
require "test_helper"

describe Customer do
let(:customer) { Customer.new }

it "must be valid" do
value(customer).must_be :valid?
end
end