Sha256: 7341a88e3b8d113b7d4d4f6f6c8abeb9eec461fba41dc860565b50944ea1991c
Contents?: true
Size: 1005 Bytes
Versions: 14
Compression:
Stored size: 1005 Bytes
Contents
# frozen_string_literal: true require File.expand_path('../../test_helper', File.dirname(__FILE__)) require 'aws-sdk-s3' require File.expand_path('../../../lib/coverband/reporters/web', File.dirname(__FILE__)) require 'rack/test' ENV['RACK_ENV'] = 'test' if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('2.2.0') module Coverband class WebTest < Minitest::Test include Rack::Test::Methods def app Coverband::Reporters::Web.new end def teardown super Coverband.configuration.s3_bucket = nil end test 'renders index content' do get '/' assert last_response.ok? assert_match 'Coverband Admin', last_response.body end test 'renders 404' do get '/show' assert last_response.not_found? assert_equal '404 error!', last_response.body end test 'clears coverband' do post '/clear' assert_equal 301, last_response.status end end end end
Version data entries
14 entries across 14 versions & 1 rubygems