diff --git a/.travis.yml b/.travis.yml index ba045d91e..bdcdddfa2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,6 +28,7 @@ env: - DF_SECRET_KEY_BASE=test_staging - DF_SECRET_KEY_ATTR=test_staging - DF_SECRET_KEY_DEVISE=test_staging + - CC_TEST_REPORTER_ID=355f46e3aec53ec2d17f714bd0eab58682dc03ee413d46195440311da30982c7 # Enable postgresql and MySQL service services: @@ -52,6 +53,9 @@ install: - bundle install --without production replica - rbenv rehash - export PATH=/tmp/texlive/bin/x86_64-linux:$PATH + - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter + - chmod +x ./cc-test-reporter + - ./cc-test-reporter before-build # Set the environment before running the tests before_script: @@ -86,3 +90,6 @@ script: - which lualatex - PATH=/tmp/texlive/bin/x86_64-linux:$PATH bundle exec rake test - PATH=/tmp/texlive/bin/x86_64-linux:$PATH RAILS_ENV=staging bundle exec rake test + +after_script: + - ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT diff --git a/Gemfile b/Gemfile index 89e611674..8f1c53ccd 100644 --- a/Gemfile +++ b/Gemfile @@ -18,7 +18,6 @@ group :development, :test do gem 'factory_girl_rails' gem 'minitest-around' gem 'minitest-hyper' - gem 'minitest-osx' gem 'minitest-rails' gem 'byebug' gem 'simplecov', require: false diff --git a/Gemfile.lock b/Gemfile.lock index 512d711c0..53dd1c50d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -133,9 +133,6 @@ GEM minitest-around (0.4.0) minitest (~> 5.0) minitest-hyper (0.2.0) - minitest-osx (0.1.0) - minitest (~> 5.4) - terminal-notifier (~> 1.6) minitest-rails (2.2.1) minitest (~> 5.7) railties (~> 4.1) @@ -239,7 +236,6 @@ GEM actionpack (>= 4.0) activesupport (>= 4.0) sprockets (>= 3.0.0) - terminal-notifier (1.6.3) thin (1.7.0) daemons (~> 1.0, >= 1.0.9) eventmachine (~> 1.0, >= 1.0.4) @@ -281,7 +277,6 @@ DEPENDENCIES json-jwt (= 1.7.0) minitest-around minitest-hyper - minitest-osx minitest-rails moss_ruby (= 1.1.2) mysql2 diff --git a/how.txt b/how.txt new file mode 100644 index 000000000..f84e1bef0 --- /dev/null +++ b/how.txt @@ -0,0 +1 @@ +How you doin'? diff --git a/test/api/tasks_test.rb b/test/api/tasks_test.rb index 6a55da7b4..2920e6424 100644 --- a/test/api/tasks_test.rb +++ b/test/api/tasks_test.rb @@ -19,4 +19,16 @@ def test_task_get # assert_json_matches_model r, expected_data[i].as_json, ['id', 'tutorial_id', 'task_definition_id', 'status'] end end + + def test_task_get_unauthorized + get '/api/tasks?unit_id=1' + + assert_equal 419, last_response.status + end + + def test_get_submission_details_unauthorized + get '/api/projects/1/task_def_id/1/submission_details' + + assert_equal 419, last_response.status + end end diff --git a/test/test_helper.rb b/test/test_helper.rb index b6237f3bc..c44aad2b6 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -19,7 +19,6 @@ # Require minitest extensions require 'minitest/rails' require 'minitest/pride' -require 'minitest/osx' require 'minitest/around' # Require all test helpers