Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a unittest to check the license.md file date range #250 #255

Merged
merged 3 commits into from
Nov 1, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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