projects
/
rails.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
cea6f9c
)
Update the user list pagination test to avoid counting users from fixtures.
author
Andy Allan
<git@gravitystorm.co.uk>
Wed, 31 May 2017 17:43:28 +0000
(18:43 +0100)
committer
Andy Allan
<git@gravitystorm.co.uk>
Wed, 31 May 2017 17:43:28 +0000
(18:43 +0100)
test/controllers/user_controller_test.rb
patch
|
blob
|
history
diff --git
a/test/controllers/user_controller_test.rb
b/test/controllers/user_controller_test.rb
index d3a654437fc4a444138a9467fa88e8ae9f4c9ee4..636ef345082c4a25bfbf19f338ae0fc447550506 100644
(file)
--- a/
test/controllers/user_controller_test.rb
+++ b/
test/controllers/user_controller_test.rb
@@
-1,8
+1,6
@@
require "test_helper"
class UserControllerTest < ActionController::TestCase
require "test_helper"
class UserControllerTest < ActionController::TestCase
- api_fixtures
-
def setup
stub_hostip_requests
end
def setup
stub_hostip_requests
end
@@
-1408,6
+1406,9
@@
class UserControllerTest < ActionController::TestCase
session[:user] = create(:administrator_user).id
session[:user] = create(:administrator_user).id
+ # 100 examples, an administrator, and a granter for the admin.
+ assert_equal 102, User.count
+
get :list
assert_response :success
assert_template :list
get :list
assert_response :success
assert_template :list
@@
-1421,7
+1422,7
@@
class UserControllerTest < ActionController::TestCase
get :list, :page => 3
assert_response :success
assert_template :list
get :list, :page => 3
assert_response :success
assert_template :list
- assert_select "table#user_list tr", :count =>
28
+ assert_select "table#user_list tr", :count =>
3
end
def test_list_post_confirm
end
def test_list_post_confirm