minitest now generally works with Devise

This commit is contained in:
Christoph Haas 2016-07-22 16:03:50 +02:00
parent b2ffd0f063
commit 1ca187e0ed
5 changed files with 36 additions and 19 deletions

View file

@ -1,23 +1,25 @@
require "test_helper"
class JsonControllerTest < ActionController::TestCase
include Devise::TestHelpers
def test_package
get :package
get :package, { name: 'firefox', format: :json }
assert_response :success
end
def test_packages
get :packages
get :packages, { format: :json }
assert_response :success
end
def test_screenshots
get :screenshots
get :screenshots, { format: :json }
assert_response :success
end
def test_packages-without-screenshots
get :packages-without-screenshots
def test_packages_without_screenshots
get :packages_without_screenshots, { format: :json }
assert_response :success
end

View file

@ -1,7 +1,7 @@
require "test_helper"
# require "test_helper"
class UsersControllerTest < ActionController::TestCase
def test_sanity
flunk "Need real tests"
end
end
# class UsersControllerTest < ActionController::TestCase
# def test_sanity
# flunk "Need real tests"
# end
# end

View file

@ -21,3 +21,14 @@
# homepage: MyString
# version: MyString
# origin: MyString
firefox:
name: firefox
description: A web browser
long_description: A program to browse web sites.
section: net
maintainer: John doe
maintainer_email: <john@example.org>
homepage: http://www.mozilla.org/
version: 10.01alpha-7
origin: Debian

View file

@ -1,7 +1,7 @@
require "test_helper"
# require "test_helper"
class ModerateHelperTest < ActionView::TestCase
def test_sanity
flunk "Need real tests"
end
end
# class ModerateHelperTest < ActionView::TestCase
# def test_sanity
# flunk "Need real tests"
# end
# end

View file

@ -16,6 +16,10 @@ Minitest::Reporters.use!
# require "minitest/pride"
class ActiveSupport::TestCase
# Setup all fixtures in test/fixtures/*.(yml|csv) for all tests in alphabetical order.
fixtures :all
# Setup all fixtures in test/fixtures/*.(yml|csv) for all tests in alphabetical order.
fixtures :all
end
class ActionController::TestCase
include Devise::TestHelpers
end