Skip to content

Commit

Permalink
Merge pull request #255 from prashuchaudhary/master
Browse files Browse the repository at this point in the history
Add a unittest to check the license.md file date range #250
  • Loading branch information
Matt Bernier authored Nov 1, 2017
2 parents 88e0afd + 18ca014 commit 0991f0d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/sendgrid/test_sendgrid-ruby.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2668,6 +2668,15 @@ def test_whitelabel_links__link_id__subuser_post
self.assert_equal('200', response.status_code)
end


def test_license_file_correct_year_range
if File.exist?('./LICENSE.txt')
# get only the first line from the license txt file
year_range = File.open('./LICENSE.txt', &:readline).gsub(/[^\d-]/, '')
self.assert_equal("2014-#{Time.now.year}", year_range)
end
end

def test_docker_exists
assert(File.file?('./Docker') || File.file?('./docker/Docker'))
end
Expand Down

0 comments on commit 0991f0d

Please sign in to comment.