Skip to content

chore: Added unittest to check for specific repo files #50

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

Merged
merged 5 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
66 changes: 65 additions & 1 deletion test/test_ruby_http_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,74 @@ def test_method_missing
assert_equal({'headers' => 'test'}, response.headers)
end

def test_docker_exists
assert(File.file?('./Dockerfile') || File.file?('./docker/Dockerfile'))
end

def test_docker_compose_exists
assert(File.file?('./docker-compose.yml') || File.file?('./docker/docker-compose.yml'))
end

def test_env_sample_exists
assert(File.file?('./.env_sample'))
end

def test_gitignore_exists
assert(File.file?('./.gitignore'))
end

def test_travis_exists
assert(File.file?('./.travis.yml'))
end

def test_codeclimate_exists
assert(File.file?('./.codeclimate.yml'))
end

def test_changelog_exists
assert(File.file?('./CHANGELOG.md'))
end

def test_code_of_conduct_exists
assert(File.file?('./CODE_OF_CONDUCT.md'))
end

def test_contributing_exists
assert(File.file?('./CONTRIBUTING.md'))
end

def test_issue_template_exists
assert(File.file?('./.github/ISSUE_TEMPLATE'))
end

def test_license_exists
assert(File.file?('./LICENSE.md') || File.file?('./LICENSE.txt'))
end

def test_pull_request_template_exists
assert(File.file?('./.github/PULL_REQUEST_TEMPLATE'))
end

def test_readme_exists
assert(File.file?('./README.md'))
end

def test_troubleshooting_exists
assert(File.file?('./TROUBLESHOOTING.md'))
end

def test_usage_exists
assert(File.file?('./USAGE.md'))
end

def test_use_cases_exists
assert(File.file?('./USE_CASES.md'))
end

def test_license_date_is_updated
license_end_year = IO.read('LICENSE.txt').match(/Copyright \(c\) 2016-(\d{4}) SendGrid/)[1].to_i
current_year = Time.new.year

assert_equal(current_year, license_end_year)
end

end