|
3 | 3 | class CommitsControllerTest < ActionController::TestCase
|
4 | 4 | def test_index_for_releases
|
5 | 5 | cases = [
|
6 |
| - [:v3_2_0, [:commit_6c65676, :commit_5b90635]], |
7 |
| - [:v2_3_2, []], |
8 |
| - [:v0_14_4, [:commit_e0ef631]], |
9 |
| - ].map {|a, b| [releases(a), Array(commits(*b))]} |
| 6 | + [releases(:v3_2_0), Array(commits(:commit_6c65676, :commit_5b90635))], |
| 7 | + [releases(:v2_3_2), []], |
| 8 | + [releases(:v0_14_4), Array(commits(:commit_e0ef631))], |
| 9 | + ] |
10 | 10 |
|
11 | 11 | cases.each do |release, commits|
|
12 | 12 | get :index, params: { release_id: release }
|
@@ -45,31 +45,31 @@ def test_commits_in_time_window
|
45 | 45 |
|
46 | 46 | cases = {
|
47 | 47 | contributors(:david) => [
|
48 |
| - ['all-time', [:commit_339e4e8, :commit_e0ef631]], |
| 48 | + ['all-time', Array(commits(:commit_339e4e8, :commit_e0ef631))], |
49 | 49 | ['today', []],
|
50 | 50 | ['this-week', []],
|
51 |
| - ['this-year', :commit_339e4e8], |
| 51 | + ['this-year', Array(commits(:commit_339e4e8))], |
52 | 52 | [since, []],
|
53 |
| - [date_range, :commit_339e4e8], |
54 |
| - ].map {|a, b| [a, Array(commits(*b))]}, |
| 53 | + [date_range, Array(commits(:commit_339e4e8))], |
| 54 | + ], |
55 | 55 |
|
56 | 56 | contributors(:jeremy) => [
|
57 |
| - ['all-time', [:commit_b821094, :commit_7cdfd91, :commit_5b90635]], |
58 |
| - ['today', :commit_b821094], |
59 |
| - ['this-week', :commit_b821094], |
60 |
| - ['this-year', [:commit_b821094, :commit_7cdfd91, :commit_5b90635]], |
61 |
| - [since, :commit_b821094], |
62 |
| - [date_range, :commit_b821094], |
63 |
| - ].map {|a, b| [a, Array(commits(*b))]}, |
| 57 | + ['all-time', Array(commits(:commit_b821094, :commit_7cdfd91, :commit_5b90635))], |
| 58 | + ['today', Array(commits(:commit_b821094))], |
| 59 | + ['this-week', Array(commits(:commit_b821094))], |
| 60 | + ['this-year', Array(commits(:commit_b821094, :commit_7cdfd91, :commit_5b90635))], |
| 61 | + [since, Array(commits(:commit_b821094))], |
| 62 | + [date_range, Array(commits(:commit_b821094))], |
| 63 | + ], |
64 | 64 |
|
65 | 65 | contributors(:vijay) => [
|
66 |
| - ['all-time', :commit_6c65676], |
| 66 | + ['all-time', Array(commits(:commit_6c65676))], |
67 | 67 | ['today', []],
|
68 | 68 | ['this-week', []],
|
69 |
| - ['this-year', :commit_6c65676], |
| 69 | + ['this-year', Array(commits(:commit_6c65676))], |
70 | 70 | [since, []],
|
71 | 71 | [date_range, []],
|
72 |
| - ].map {|a, b| [a, Array(commits(*b))]}, |
| 72 | + ], |
73 | 73 | }
|
74 | 74 |
|
75 | 75 | time_travel do
|
|
0 commit comments