Skip to content

Commit

Permalink
some test
Browse files Browse the repository at this point in the history
  • Loading branch information
MonalisaC committed May 7, 2018
1 parent 6fa399b commit 44d02e9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/models/movie.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,8 @@ class Movie < ApplicationRecord
validates :title, presence: true
validates :release_date, presence: true
validates :inventory, presence: true

def available_inventory
return self.inventory
end
end
2 changes: 2 additions & 0 deletions test/models/movie_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

describe Movie do
let(:movie) { Movie.new }
let(:movie1) {movies(:one) }


it "must be valid" do
value(movie).must_be :valid?
Expand Down

0 comments on commit 44d02e9

Please sign in to comment.