@@ -1835,42 +1835,42 class IssueTest < ActiveSupport::TestCase | |||||
1835 | test "#by_tracker" do |
|
1835 | test "#by_tracker" do | |
1836 | User.current = User.anonymous |
|
1836 | User.current = User.anonymous | |
1837 | groups = Issue.by_tracker(Project.find(1)) |
|
1837 | groups = Issue.by_tracker(Project.find(1)) | |
1838 |
assert_equal 3, groups. |
|
1838 | assert_equal 3, groups.count | |
1839 | assert_equal 7, groups.inject(0) {|sum, group| sum + group['total'].to_i} |
|
1839 | assert_equal 7, groups.inject(0) {|sum, group| sum + group['total'].to_i} | |
1840 | end |
|
1840 | end | |
1841 |
|
1841 | |||
1842 | test "#by_version" do |
|
1842 | test "#by_version" do | |
1843 | User.current = User.anonymous |
|
1843 | User.current = User.anonymous | |
1844 | groups = Issue.by_version(Project.find(1)) |
|
1844 | groups = Issue.by_version(Project.find(1)) | |
1845 |
assert_equal 3, groups. |
|
1845 | assert_equal 3, groups.count | |
1846 | assert_equal 3, groups.inject(0) {|sum, group| sum + group['total'].to_i} |
|
1846 | assert_equal 3, groups.inject(0) {|sum, group| sum + group['total'].to_i} | |
1847 | end |
|
1847 | end | |
1848 |
|
1848 | |||
1849 | test "#by_priority" do |
|
1849 | test "#by_priority" do | |
1850 | User.current = User.anonymous |
|
1850 | User.current = User.anonymous | |
1851 | groups = Issue.by_priority(Project.find(1)) |
|
1851 | groups = Issue.by_priority(Project.find(1)) | |
1852 |
assert_equal 4, groups. |
|
1852 | assert_equal 4, groups.count | |
1853 | assert_equal 7, groups.inject(0) {|sum, group| sum + group['total'].to_i} |
|
1853 | assert_equal 7, groups.inject(0) {|sum, group| sum + group['total'].to_i} | |
1854 | end |
|
1854 | end | |
1855 |
|
1855 | |||
1856 | test "#by_category" do |
|
1856 | test "#by_category" do | |
1857 | User.current = User.anonymous |
|
1857 | User.current = User.anonymous | |
1858 | groups = Issue.by_category(Project.find(1)) |
|
1858 | groups = Issue.by_category(Project.find(1)) | |
1859 |
assert_equal 2, groups. |
|
1859 | assert_equal 2, groups.count | |
1860 | assert_equal 3, groups.inject(0) {|sum, group| sum + group['total'].to_i} |
|
1860 | assert_equal 3, groups.inject(0) {|sum, group| sum + group['total'].to_i} | |
1861 | end |
|
1861 | end | |
1862 |
|
1862 | |||
1863 | test "#by_assigned_to" do |
|
1863 | test "#by_assigned_to" do | |
1864 | User.current = User.anonymous |
|
1864 | User.current = User.anonymous | |
1865 | groups = Issue.by_assigned_to(Project.find(1)) |
|
1865 | groups = Issue.by_assigned_to(Project.find(1)) | |
1866 |
assert_equal 2, groups. |
|
1866 | assert_equal 2, groups.count | |
1867 | assert_equal 2, groups.inject(0) {|sum, group| sum + group['total'].to_i} |
|
1867 | assert_equal 2, groups.inject(0) {|sum, group| sum + group['total'].to_i} | |
1868 | end |
|
1868 | end | |
1869 |
|
1869 | |||
1870 | test "#by_author" do |
|
1870 | test "#by_author" do | |
1871 | User.current = User.anonymous |
|
1871 | User.current = User.anonymous | |
1872 | groups = Issue.by_author(Project.find(1)) |
|
1872 | groups = Issue.by_author(Project.find(1)) | |
1873 |
assert_equal 4, groups. |
|
1873 | assert_equal 4, groups.count | |
1874 | assert_equal 7, groups.inject(0) {|sum, group| sum + group['total'].to_i} |
|
1874 | assert_equal 7, groups.inject(0) {|sum, group| sum + group['total'].to_i} | |
1875 | end |
|
1875 | end | |
1876 |
|
1876 | |||
@@ -1878,7 +1878,7 class IssueTest < ActiveSupport::TestCase | |||||
1878 | User.current = User.anonymous |
|
1878 | User.current = User.anonymous | |
1879 | groups = Issue.by_subproject(Project.find(1)) |
|
1879 | groups = Issue.by_subproject(Project.find(1)) | |
1880 | # Private descendant not visible |
|
1880 | # Private descendant not visible | |
1881 |
assert_equal 1, groups. |
|
1881 | assert_equal 1, groups.count | |
1882 | assert_equal 2, groups.inject(0) {|sum, group| sum + group['total'].to_i} |
|
1882 | assert_equal 2, groups.inject(0) {|sum, group| sum + group['total'].to_i} | |
1883 | end |
|
1883 | end | |
1884 |
|
1884 |
General Comments 0
You need to be logged in to leave comments.
Login now