minitest now generally works with Devise
This commit is contained in:
parent
b2ffd0f063
commit
1ca187e0ed
5 changed files with 36 additions and 19 deletions
|
|
@ -1,23 +1,25 @@
|
||||||
require "test_helper"
|
require "test_helper"
|
||||||
|
|
||||||
class JsonControllerTest < ActionController::TestCase
|
class JsonControllerTest < ActionController::TestCase
|
||||||
|
include Devise::TestHelpers
|
||||||
|
|
||||||
def test_package
|
def test_package
|
||||||
get :package
|
get :package, { name: 'firefox', format: :json }
|
||||||
assert_response :success
|
assert_response :success
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_packages
|
def test_packages
|
||||||
get :packages
|
get :packages, { format: :json }
|
||||||
assert_response :success
|
assert_response :success
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_screenshots
|
def test_screenshots
|
||||||
get :screenshots
|
get :screenshots, { format: :json }
|
||||||
assert_response :success
|
assert_response :success
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_packages-without-screenshots
|
def test_packages_without_screenshots
|
||||||
get :packages-without-screenshots
|
get :packages_without_screenshots, { format: :json }
|
||||||
assert_response :success
|
assert_response :success
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
require "test_helper"
|
# require "test_helper"
|
||||||
|
|
||||||
class UsersControllerTest < ActionController::TestCase
|
# class UsersControllerTest < ActionController::TestCase
|
||||||
def test_sanity
|
# def test_sanity
|
||||||
flunk "Need real tests"
|
# flunk "Need real tests"
|
||||||
end
|
# end
|
||||||
end
|
# end
|
||||||
|
|
|
||||||
11
test/fixtures/packages.yml
vendored
11
test/fixtures/packages.yml
vendored
|
|
@ -21,3 +21,14 @@
|
||||||
# homepage: MyString
|
# homepage: MyString
|
||||||
# version: MyString
|
# version: MyString
|
||||||
# origin: 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
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
require "test_helper"
|
# require "test_helper"
|
||||||
|
|
||||||
class ModerateHelperTest < ActionView::TestCase
|
# class ModerateHelperTest < ActionView::TestCase
|
||||||
def test_sanity
|
# def test_sanity
|
||||||
flunk "Need real tests"
|
# flunk "Need real tests"
|
||||||
end
|
# end
|
||||||
end
|
# end
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,10 @@ Minitest::Reporters.use!
|
||||||
# require "minitest/pride"
|
# require "minitest/pride"
|
||||||
|
|
||||||
class ActiveSupport::TestCase
|
class ActiveSupport::TestCase
|
||||||
# Setup all fixtures in test/fixtures/*.(yml|csv) for all tests in alphabetical order.
|
# Setup all fixtures in test/fixtures/*.(yml|csv) for all tests in alphabetical order.
|
||||||
fixtures :all
|
fixtures :all
|
||||||
end
|
end
|
||||||
|
|
||||||
|
class ActionController::TestCase
|
||||||
|
include Devise::TestHelpers
|
||||||
|
end
|
||||||
Loading…
Add table
Add a link
Reference in a new issue