Skip to content

Commit

Permalink
Merge pull request #12 from migavocarjo-okta/validate-year
Browse files Browse the repository at this point in the history
Update books_spec.rb
  • Loading branch information
Michael Johnson committed Jan 19, 2021
2 parents 17f8e8d + 67cd886 commit 5a67be9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/models/book.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class Book < ApplicationRecord
validates :title, presence: true
# validates :year_published, numericality: { only_integer: true }
validates :year_published, numericality: { only_integer: true }

def old?
return false unless year_published
Expand Down
2 changes: 1 addition & 1 deletion spec/features/books_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
end

# TODO: Replace `skip` with `it`
skip "validates a numeric year" do
it "validates a numeric year" do
visit "/books/new"
within "#as_books-create--form" do
fill_in "Title", with: "Pro Git"
Expand Down

0 comments on commit 5a67be9

Please sign in to comment.