mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-17 07:40:12 +01:00
One more decomissioned test file away
This commit is contained in:
parent
80aad1b4f2
commit
088346ecb0
1 changed files with 0 additions and 34 deletions
|
|
@ -1,34 +0,0 @@
|
||||||
require 'test_helper'
|
|
||||||
|
|
||||||
class ContextActionsDataTest < ActionController::TestCase
|
|
||||||
tests StatsController
|
|
||||||
|
|
||||||
def test_total_with_more_than_10_items
|
|
||||||
login_as(:admin_user)
|
|
||||||
contexts = [
|
|
||||||
{'id' => 1, 'name' => 'one', 'total' => 11},
|
|
||||||
{'id' => 2, 'name' => 'two', 'total' => 4},
|
|
||||||
{'id' => 3, 'name' => 'three', 'total' => 8}
|
|
||||||
]
|
|
||||||
Stats::TopContextsQuery.any_instance.stubs(:result).returns contexts
|
|
||||||
|
|
||||||
get :context_total_actions_data
|
|
||||||
|
|
||||||
assert_equal [47, 17, 34], assigns[:data].values
|
|
||||||
end
|
|
||||||
|
|
||||||
def test_running_actions
|
|
||||||
login_as(:admin_user)
|
|
||||||
contexts = [
|
|
||||||
{'id' => 1, 'name' => 'one', 'total' => 11},
|
|
||||||
{'id' => 2, 'name' => 'two', 'total' => 4},
|
|
||||||
{'id' => 3, 'name' => 'three', 'total' => 8}
|
|
||||||
]
|
|
||||||
Stats::TopContextsQuery.any_instance.stubs(:result).returns contexts
|
|
||||||
|
|
||||||
get :context_running_actions_data
|
|
||||||
|
|
||||||
assert_equal [47, 17, 34], assigns[:data].values
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue