Skip to content

Commit

Permalink
Refs issue #11: Add a test for invalid authors
Browse files Browse the repository at this point in the history
  • Loading branch information
Markus-Brand committed Nov 3, 2017
1 parent 8f231e9 commit 237e966
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions spec/models/author_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,9 @@
expect(author.homepage).to eq('http://wikipedia.org/Alan_Turing')
expect(author.name).to eq('Alan Turing')
end

it 'should not be able to create an author without last name' do
author = Author.new(first_name: 'Alan', last_name: '', homepage:'test')
expect(author).not_to be_valid
end
end

0 comments on commit 237e966

Please sign in to comment.