test: Tests updated with branch coverage

SimpleCov consolse formatter
This commit is contained in:
Juan Rodriguez
2021-06-14 15:12:47 -05:00
parent 3feaa5d88f
commit d134be737a
6 changed files with 65 additions and 13 deletions
+4 -4
View File
@@ -3,24 +3,24 @@
require 'test_helper'
class LinkTest < ActiveSupport::TestCase
test 'should not save a link without a url' do
test 'Should not save a link without a url' do
link = Link.new
assert_not link.save, 'Saved the link without a url'
end
test 'should not save a link with a invalid url' do
test 'Should not save a link with a invalid url' do
link = Link.new
link.url = 'test.com'
assert_not link.save, 'Saved the link with invalid url format'
end
test 'should create a link with a valid url' do
test 'Should create a link with a valid url' do
link = Link.new
link.url = 'https://test.com'
assert link.save, 'Link with valid url not saved'
end
test 'should generate a slug on save a new link' do
test 'Should generate a slug on save a new link' do
link = links(:one)
assert link.slug, 'Slug not generated on save a new link'
end