resque-web 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (26) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +32 -0
  3. data/app/assets/stylesheets/resque_web/{bootstrap_and_overrides.css → bootstrap_and_overrides.css.erb} +1 -1
  4. data/app/controllers/resque_web/application_controller.rb +9 -1
  5. data/app/views/layouts/resque_web/application.html.erb +1 -1
  6. data/app/views/resque_web/failures/index.html.erb +1 -1
  7. data/app/views/resque_web/workers/show.html.erb +2 -2
  8. data/app/views/resque_web/working/_working.html.erb +2 -2
  9. data/config/initializers/resque_config.rb +0 -1
  10. data/lib/resque_web/tabs.rb +21 -0
  11. data/lib/resque_web/version.rb +1 -1
  12. data/test/dummy/log/development.log +2108 -0
  13. data/test/dummy/log/test.log +392 -0
  14. data/test/dummy/tmp/cache/assets/development/sprockets/373b0c58027ae58f732cc7e48e62a522 +0 -0
  15. data/test/dummy/tmp/cache/assets/development/sprockets/4d22200fb380d8ae9d5f07525088622f +0 -0
  16. data/test/dummy/tmp/cache/assets/development/sprockets/77c22795a818c14728d95acd9587b669 +0 -0
  17. data/test/dummy/tmp/cache/assets/development/sprockets/8fbf100e961e22baca23d1850b41e4d5 +0 -0
  18. data/test/dummy/tmp/cache/assets/development/sprockets/b4d13aa7c0619b532c51ba11cf25a61c +0 -0
  19. data/test/dummy/tmp/cache/assets/development/sprockets/cfedb3b22e14b70300291f97fb8376e5 +0 -0
  20. data/test/dummy/tmp/pids/server.pid +1 -0
  21. data/test/functional/failures_controller_test.rb +10 -9
  22. data/test/functional/overview_controller_test.rb +34 -4
  23. data/test/functional/queues_controller_test.rb +4 -1
  24. data/test/support/controller_test_helpers.rb +22 -0
  25. metadata +14 -5
  26. data/test/dummy/config/initializers/wat.rb +0 -1
@@ -1723,3 +1723,395 @@ Processing by ResqueWeb::QueuesController#destroy as HTML
1723
1723
  Redirected to http://test.host/resque_web/queues
1724
1724
  Completed 302 Found in 3ms (ActiveRecord: 0.0ms)
1725
1725
   (0.1ms) rollback transaction
1726
+  (0.5ms) begin transaction
1727
+ ---------------------------------------------------
1728
+ DELETE /failures/:id: test_0001_deletes the failure
1729
+ ---------------------------------------------------
1730
+ Processing by ResqueWeb::FailuresController#destroy as HTML
1731
+ Parameters: {"id"=>"123"}
1732
+ Redirected to http://test.host/resque_web/failures
1733
+ Completed 302 Found in 3ms (ActiveRecord: 0.0ms)
1734
+  (0.2ms) rollback transaction
1735
+  (0.4ms) begin transaction
1736
+ ------------------------------------------------------------
1737
+ DELETE /failures/destroy_all: test_0001_deletes all failures
1738
+ ------------------------------------------------------------
1739
+ Processing by ResqueWeb::FailuresController#destroy_all as HTML
1740
+ Redirected to http://test.host/resque_web/failures
1741
+ Completed 302 Found in 1ms (ActiveRecord: 0.0ms)
1742
+  (0.2ms) rollback transaction
1743
+  (0.2ms) begin transaction
1744
+ -----------------------------------------------------------------------------------
1745
+ GET /::when HTTP Basic Authentication is disabled: test_0001_should grant me access
1746
+ -----------------------------------------------------------------------------------
1747
+ Processing by ResqueWeb::OverviewController#show as HTML
1748
+ Rendered /home/tony/src/resque_web/app/views/resque_web/queues/_queues_basic.html.erb (39.3ms)
1749
+ Rendered /home/tony/src/resque_web/app/views/resque_web/queues/_queues.html.erb (43.9ms)
1750
+ Rendered /home/tony/src/resque_web/app/views/resque_web/working/_working.html.erb (2.5ms)
1751
+ Completed 200 OK in 312ms (Views: 311.2ms | ActiveRecord: 0.0ms)
1752
+  (0.1ms) rollback transaction
1753
+  (0.1ms) begin transaction
1754
+ ---------------------------------------------------------------------------------------------------------------------------------------
1755
+ GET /::when HTTP Basic Authentication is enabled::and the currect username and password are supplied : test_0001_should grant me access
1756
+ ---------------------------------------------------------------------------------------------------------------------------------------
1757
+ Processing by ResqueWeb::OverviewController#show as HTML
1758
+ Rendered /home/tony/src/resque_web/app/views/resque_web/queues/_queues_basic.html.erb (5.6ms)
1759
+ Rendered /home/tony/src/resque_web/app/views/resque_web/queues/_queues.html.erb (5.9ms)
1760
+ Rendered /home/tony/src/resque_web/app/views/resque_web/working/_working.html.erb (1.8ms)
1761
+ Completed 200 OK in 13ms (Views: 12.7ms | ActiveRecord: 0.0ms)
1762
+  (0.2ms) rollback transaction
1763
+  (0.1ms) begin transaction
1764
+ ---------------------------------------------------------------------------------------------------------------------------------
1765
+ GET /::when HTTP Basic Authentication is enabled::and the username and password are not supplied: test_0001_should deny me access
1766
+ ---------------------------------------------------------------------------------------------------------------------------------
1767
+ Processing by ResqueWeb::OverviewController#show as HTML
1768
+ Filter chain halted as :authorize rendered or redirected
1769
+ Completed 401 Unauthorized in 1ms (ActiveRecord: 0.0ms)
1770
+  (0.2ms) rollback transaction
1771
+  (0.1ms) begin transaction
1772
+ -----------------------------------------------
1773
+ GET /failures: test_0001_renders the index page
1774
+ -----------------------------------------------
1775
+ Processing by ResqueWeb::FailuresController#index as HTML
1776
+ Rendered /home/tony/src/resque_web/app/views/resque_web/failures/_failed_job.html.erb (27.9ms)
1777
+ Completed 200 OK in 45ms (Views: 44.8ms | ActiveRecord: 0.0ms)
1778
+  (0.1ms) rollback transaction
1779
+  (0.1ms) begin transaction
1780
+ --------------------------------------------------------------------------------------
1781
+ PUT /failures/:id/retry: test_0001_retries the failure and remove the original message
1782
+ --------------------------------------------------------------------------------------
1783
+ Processing by ResqueWeb::FailuresController#retry as HTML
1784
+ Parameters: {"id"=>"123"}
1785
+ Redirected to http://test.host/resque_web/failures
1786
+ Completed 302 Found in 1ms (ActiveRecord: 0.0ms)
1787
+  (0.3ms) rollback transaction
1788
+  (0.2ms) begin transaction
1789
+ -------------------------------------------------------------------------------------
1790
+ PUT /failures/:id/retry: test_0002_retries should work also in case of pre 2.0 Resque
1791
+ -------------------------------------------------------------------------------------
1792
+ Processing by ResqueWeb::FailuresController#retry as HTML
1793
+ Parameters: {"id"=>"123"}
1794
+ Redirected to http://test.host/resque_web/failures
1795
+ Completed 302 Found in 1ms (ActiveRecord: 0.0ms)
1796
+  (0.2ms) rollback transaction
1797
+  (0.1ms) begin transaction
1798
+ -------------------------------------------------------------------------------------------
1799
+ PUT /failures/retry_all: test_0001_retries all failures using requeue if no queue specified
1800
+ -------------------------------------------------------------------------------------------
1801
+ Processing by ResqueWeb::FailuresController#retry_all as HTML
1802
+ Redirected to http://test.host/resque_web/failures
1803
+ Completed 302 Found in 2ms (ActiveRecord: 0.0ms)
1804
+  (0.2ms) rollback transaction
1805
+  (0.2ms) begin transaction
1806
+ -----------------------------------------------------------------------------------------------
1807
+ PUT /failures/retry_all: test_0002_retries all failures should also work case of pre 2.0 Resque
1808
+ -----------------------------------------------------------------------------------------------
1809
+ Processing by ResqueWeb::FailuresController#retry_all as HTML
1810
+ Redirected to http://test.host/resque_web/failures
1811
+ Completed 302 Found in 1ms (ActiveRecord: 0.0ms)
1812
+  (0.2ms) rollback transaction
1813
+  (0.1ms) begin transaction
1814
+ ----------------------------------------------------------------------------------------------
1815
+ PUT /failures/retry_all: test_0003_retries all failures using requeue_queue if queue specified
1816
+ ----------------------------------------------------------------------------------------------
1817
+ Processing by ResqueWeb::FailuresController#retry_all as HTML
1818
+ Parameters: {"queue"=>"myqueue"}
1819
+ Redirected to http://test.host/resque_web/failures?queue=myqueue
1820
+ Completed 302 Found in 2ms (ActiveRecord: 0.0ms)
1821
+  (0.1ms) rollback transaction
1822
+  (0.1ms) begin transaction
1823
+ ---------------------------------------------------------
1824
+ ResqueWeb::QueuesControllerTest: test_0001_deletes queues
1825
+ ---------------------------------------------------------
1826
+ Processing by ResqueWeb::QueuesController#destroy as HTML
1827
+ Parameters: {"id"=>"example_queue"}
1828
+ Redirected to http://test.host/resque_web/queues
1829
+ Completed 302 Found in 3ms (ActiveRecord: 0.0ms)
1830
+  (0.3ms) rollback transaction
1831
+  (0.5ms) begin transaction
1832
+ ---------------------------------------------------
1833
+ DELETE /failures/:id: test_0001_deletes the failure
1834
+ ---------------------------------------------------
1835
+ Processing by ResqueWeb::FailuresController#destroy as HTML
1836
+ Parameters: {"id"=>"123"}
1837
+ Redirected to http://test.host/resque_web/failures
1838
+ Completed 302 Found in 3ms (ActiveRecord: 0.0ms)
1839
+  (0.1ms) rollback transaction
1840
+  (0.1ms) begin transaction
1841
+ ------------------------------------------------------------
1842
+ DELETE /failures/destroy_all: test_0001_deletes all failures
1843
+ ------------------------------------------------------------
1844
+ Processing by ResqueWeb::FailuresController#destroy_all as HTML
1845
+ Redirected to http://test.host/resque_web/failures
1846
+ Completed 302 Found in 1ms (ActiveRecord: 0.0ms)
1847
+  (0.2ms) rollback transaction
1848
+  (0.2ms) begin transaction
1849
+ -----------------------------------------------------------------------------------
1850
+ GET /::when HTTP Basic Authentication is disabled: test_0001_should grant me access
1851
+ -----------------------------------------------------------------------------------
1852
+ Processing by ResqueWeb::OverviewController#show as HTML
1853
+ Rendered /home/tony/src/resque_web/app/views/resque_web/queues/_queues_basic.html.erb (6.4ms)
1854
+ Rendered /home/tony/src/resque_web/app/views/resque_web/queues/_queues.html.erb (10.5ms)
1855
+ Rendered /home/tony/src/resque_web/app/views/resque_web/working/_working.html.erb (4.0ms)
1856
+ Completed 200 OK in 124ms (Views: 122.8ms | ActiveRecord: 0.0ms)
1857
+  (0.1ms) rollback transaction
1858
+  (0.2ms) begin transaction
1859
+ ---------------------------------------------------------------------------------------------------------------------------------------
1860
+ GET /::when HTTP Basic Authentication is enabled::and the currect username and password are supplied : test_0001_should grant me access
1861
+ ---------------------------------------------------------------------------------------------------------------------------------------
1862
+ Processing by ResqueWeb::OverviewController#show as HTML
1863
+ Rendered /home/tony/src/resque_web/app/views/resque_web/queues/_queues_basic.html.erb (4.8ms)
1864
+ Rendered /home/tony/src/resque_web/app/views/resque_web/queues/_queues.html.erb (5.3ms)
1865
+ Rendered /home/tony/src/resque_web/app/views/resque_web/working/_working.html.erb (1.9ms)
1866
+ Completed 200 OK in 13ms (Views: 12.7ms | ActiveRecord: 0.0ms)
1867
+  (0.2ms) rollback transaction
1868
+  (0.1ms) begin transaction
1869
+ ---------------------------------------------------------------------------------------------------------------------------------
1870
+ GET /::when HTTP Basic Authentication is enabled::and the username and password are not supplied: test_0001_should deny me access
1871
+ ---------------------------------------------------------------------------------------------------------------------------------
1872
+ Processing by ResqueWeb::OverviewController#show as HTML
1873
+ Filter chain halted as :authorize rendered or redirected
1874
+ Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms)
1875
+  (0.2ms) rollback transaction
1876
+  (0.1ms) begin transaction
1877
+ -----------------------------------------------
1878
+ GET /failures: test_0001_renders the index page
1879
+ -----------------------------------------------
1880
+ Processing by ResqueWeb::FailuresController#index as HTML
1881
+ Rendered /home/tony/src/resque_web/app/views/resque_web/failures/_failed_job.html.erb (4.5ms)
1882
+ Completed 200 OK in 17ms (Views: 15.7ms | ActiveRecord: 0.0ms)
1883
+  (0.2ms) rollback transaction
1884
+  (0.1ms) begin transaction
1885
+ --------------------------------------------------------------------------------------
1886
+ PUT /failures/:id/retry: test_0001_retries the failure and remove the original message
1887
+ --------------------------------------------------------------------------------------
1888
+ Processing by ResqueWeb::FailuresController#retry as HTML
1889
+ Parameters: {"id"=>"123"}
1890
+ Redirected to http://test.host/resque_web/failures
1891
+ Completed 302 Found in 2ms (ActiveRecord: 0.0ms)
1892
+  (0.2ms) rollback transaction
1893
+  (0.4ms) begin transaction
1894
+ -------------------------------------------------------------------------------------
1895
+ PUT /failures/:id/retry: test_0002_retries should work also in case of pre 2.0 Resque
1896
+ -------------------------------------------------------------------------------------
1897
+ Processing by ResqueWeb::FailuresController#retry as HTML
1898
+ Parameters: {"id"=>"123"}
1899
+ Redirected to http://test.host/resque_web/failures
1900
+ Completed 302 Found in 1ms (ActiveRecord: 0.0ms)
1901
+  (0.1ms) rollback transaction
1902
+  (0.1ms) begin transaction
1903
+ -------------------------------------------------------------------------------------------
1904
+ PUT /failures/retry_all: test_0001_retries all failures using requeue if no queue specified
1905
+ -------------------------------------------------------------------------------------------
1906
+ Processing by ResqueWeb::FailuresController#retry_all as HTML
1907
+ Redirected to http://test.host/resque_web/failures
1908
+ Completed 302 Found in 3ms (ActiveRecord: 0.0ms)
1909
+  (0.2ms) rollback transaction
1910
+  (0.3ms) begin transaction
1911
+ -----------------------------------------------------------------------------------------------
1912
+ PUT /failures/retry_all: test_0002_retries all failures should also work case of pre 2.0 Resque
1913
+ -----------------------------------------------------------------------------------------------
1914
+ Processing by ResqueWeb::FailuresController#retry_all as HTML
1915
+ Redirected to http://test.host/resque_web/failures
1916
+ Completed 302 Found in 1ms (ActiveRecord: 0.0ms)
1917
+  (0.2ms) rollback transaction
1918
+  (0.2ms) begin transaction
1919
+ ----------------------------------------------------------------------------------------------
1920
+ PUT /failures/retry_all: test_0003_retries all failures using requeue_queue if queue specified
1921
+ ----------------------------------------------------------------------------------------------
1922
+ Processing by ResqueWeb::FailuresController#retry_all as HTML
1923
+ Parameters: {"queue"=>"myqueue"}
1924
+ Redirected to http://test.host/resque_web/failures?queue=myqueue
1925
+ Completed 302 Found in 2ms (ActiveRecord: 0.0ms)
1926
+  (0.1ms) rollback transaction
1927
+  (0.1ms) begin transaction
1928
+ ---------------------------------------------------------
1929
+ ResqueWeb::QueuesControllerTest: test_0001_deletes queues
1930
+ ---------------------------------------------------------
1931
+ Processing by ResqueWeb::QueuesController#destroy as HTML
1932
+ Parameters: {"id"=>"example_queue"}
1933
+ Redirected to http://test.host/resque_web/queues
1934
+ Completed 302 Found in 4ms (ActiveRecord: 0.0ms)
1935
+  (0.2ms) rollback transaction
1936
+  (1.0ms) begin transaction
1937
+ ---------------------------------------------------
1938
+ DELETE /failures/:id: test_0001_deletes the failure
1939
+ ---------------------------------------------------
1940
+ Processing by ResqueWeb::FailuresController#destroy as HTML
1941
+ Parameters: {"id"=>"123"}
1942
+ Redirected to http://test.host/resque_web/failures
1943
+ Completed 302 Found in 1ms (ActiveRecord: 0.0ms)
1944
+  (0.3ms) rollback transaction
1945
+  (0.1ms) begin transaction
1946
+ ------------------------------------------------------------
1947
+ DELETE /failures/destroy_all: test_0001_deletes all failures
1948
+ ------------------------------------------------------------
1949
+ Processing by ResqueWeb::FailuresController#destroy_all as HTML
1950
+ Redirected to http://test.host/resque_web/failures
1951
+ Completed 302 Found in 2ms (ActiveRecord: 0.0ms)
1952
+  (0.2ms) rollback transaction
1953
+  (0.2ms) begin transaction
1954
+ -----------------------------------------------------------------------------------
1955
+ GET /::when HTTP Basic Authentication is disabled: test_0001_should grant me access
1956
+ -----------------------------------------------------------------------------------
1957
+ Processing by ResqueWeb::OverviewController#show as HTML
1958
+ Rendered /home/tony/src/resque_web/app/views/resque_web/queues/_queues_basic.html.erb (6.7ms)
1959
+ Rendered /home/tony/src/resque_web/app/views/resque_web/queues/_queues.html.erb (11.2ms)
1960
+ Rendered /home/tony/src/resque_web/app/views/resque_web/working/_working.html.erb (4.1ms)
1961
+ Completed 200 OK in 128ms (Views: 127.1ms | ActiveRecord: 0.0ms)
1962
+  (0.1ms) rollback transaction
1963
+  (0.2ms) begin transaction
1964
+ ---------------------------------------------------------------------------------------------------------------------------------------
1965
+ GET /::when HTTP Basic Authentication is enabled::and the currect username and password are supplied : test_0001_should grant me access
1966
+ ---------------------------------------------------------------------------------------------------------------------------------------
1967
+ Processing by ResqueWeb::OverviewController#show as HTML
1968
+ Rendered /home/tony/src/resque_web/app/views/resque_web/queues/_queues_basic.html.erb (4.7ms)
1969
+ Rendered /home/tony/src/resque_web/app/views/resque_web/queues/_queues.html.erb (5.3ms)
1970
+ Rendered /home/tony/src/resque_web/app/views/resque_web/working/_working.html.erb (1.6ms)
1971
+ Completed 200 OK in 12ms (Views: 11.8ms | ActiveRecord: 0.0ms)
1972
+  (0.2ms) rollback transaction
1973
+  (0.3ms) begin transaction
1974
+ ---------------------------------------------------------------------------------------------------------------------------------
1975
+ GET /::when HTTP Basic Authentication is enabled::and the username and password are not supplied: test_0001_should deny me access
1976
+ ---------------------------------------------------------------------------------------------------------------------------------
1977
+ Processing by ResqueWeb::OverviewController#show as HTML
1978
+ Filter chain halted as :authorize rendered or redirected
1979
+ Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms)
1980
+  (0.2ms) rollback transaction
1981
+  (0.1ms) begin transaction
1982
+ -----------------------------------------------
1983
+ GET /failures: test_0001_renders the index page
1984
+ -----------------------------------------------
1985
+ Processing by ResqueWeb::FailuresController#index as HTML
1986
+ Rendered /home/tony/src/resque_web/app/views/resque_web/failures/_failed_job.html.erb (3.1ms)
1987
+ Completed 200 OK in 17ms (Views: 16.6ms | ActiveRecord: 0.0ms)
1988
+  (0.2ms) rollback transaction
1989
+  (0.2ms) begin transaction
1990
+ --------------------------------------------------------------------------------------
1991
+ PUT /failures/:id/retry: test_0001_retries the failure and remove the original message
1992
+ --------------------------------------------------------------------------------------
1993
+ Processing by ResqueWeb::FailuresController#retry as HTML
1994
+ Parameters: {"id"=>"123"}
1995
+ Redirected to http://test.host/resque_web/failures
1996
+ Completed 302 Found in 1ms (ActiveRecord: 0.0ms)
1997
+  (0.2ms) rollback transaction
1998
+  (0.3ms) begin transaction
1999
+ -------------------------------------------------------------------------------------
2000
+ PUT /failures/:id/retry: test_0002_retries should work also in case of pre 2.0 Resque
2001
+ -------------------------------------------------------------------------------------
2002
+ Processing by ResqueWeb::FailuresController#retry as HTML
2003
+ Parameters: {"id"=>"123"}
2004
+ Redirected to http://test.host/resque_web/failures
2005
+ Completed 302 Found in 2ms (ActiveRecord: 0.0ms)
2006
+  (0.3ms) rollback transaction
2007
+  (0.1ms) begin transaction
2008
+ -------------------------------------------------------------------------------------------
2009
+ PUT /failures/retry_all: test_0001_retries all failures using requeue if no queue specified
2010
+ -------------------------------------------------------------------------------------------
2011
+ Processing by ResqueWeb::FailuresController#retry_all as HTML
2012
+ Redirected to http://test.host/resque_web/failures
2013
+ Completed 302 Found in 1ms (ActiveRecord: 0.0ms)
2014
+  (1.0ms) rollback transaction
2015
+  (0.2ms) begin transaction
2016
+ -----------------------------------------------------------------------------------------------
2017
+ PUT /failures/retry_all: test_0002_retries all failures should also work case of pre 2.0 Resque
2018
+ -----------------------------------------------------------------------------------------------
2019
+ Processing by ResqueWeb::FailuresController#retry_all as HTML
2020
+ Redirected to http://test.host/resque_web/failures
2021
+ Completed 302 Found in 1ms (ActiveRecord: 0.0ms)
2022
+  (0.2ms) rollback transaction
2023
+  (0.1ms) begin transaction
2024
+ ----------------------------------------------------------------------------------------------
2025
+ PUT /failures/retry_all: test_0003_retries all failures using requeue_queue if queue specified
2026
+ ----------------------------------------------------------------------------------------------
2027
+ Processing by ResqueWeb::FailuresController#retry_all as HTML
2028
+ Parameters: {"queue"=>"myqueue"}
2029
+ Redirected to http://test.host/resque_web/failures?queue=myqueue
2030
+ Completed 302 Found in 2ms (ActiveRecord: 0.0ms)
2031
+  (0.2ms) rollback transaction
2032
+  (0.3ms) begin transaction
2033
+ ---------------------------------------------------------
2034
+ ResqueWeb::QueuesControllerTest: test_0001_deletes queues
2035
+ ---------------------------------------------------------
2036
+ Processing by ResqueWeb::QueuesController#destroy as HTML
2037
+ Parameters: {"id"=>"example_queue"}
2038
+ Redirected to http://test.host/resque_web/queues
2039
+ Completed 302 Found in 2ms (ActiveRecord: 0.0ms)
2040
+  (0.1ms) rollback transaction
2041
+  (0.7ms) begin transaction
2042
+ ---------------------------------------------------
2043
+ DELETE /failures/:id: test_0001_deletes the failure
2044
+ ---------------------------------------------------
2045
+ Processing by ResqueWeb::FailuresController#destroy as HTML
2046
+ Parameters: {"id"=>"123"}
2047
+ Redirected to http://test.host/resque_web/failures
2048
+ Completed 302 Found in 2ms (ActiveRecord: 0.0ms)
2049
+  (0.2ms) rollback transaction
2050
+  (0.3ms) begin transaction
2051
+ ------------------------------------------------------------
2052
+ DELETE /failures/destroy_all: test_0001_deletes all failures
2053
+ ------------------------------------------------------------
2054
+ Processing by ResqueWeb::FailuresController#destroy_all as HTML
2055
+ Redirected to http://test.host/resque_web/failures
2056
+ Completed 302 Found in 2ms (ActiveRecord: 0.0ms)
2057
+  (0.4ms) rollback transaction
2058
+  (0.2ms) begin transaction
2059
+ -----------------------------------------------
2060
+ GET /failures: test_0001_renders the index page
2061
+ -----------------------------------------------
2062
+ Processing by ResqueWeb::FailuresController#index as HTML
2063
+ Rendered /home/tony/src/resque_web/app/views/resque_web/failures/_failed_job.html.erb (12.6ms)
2064
+ Completed 500 Internal Server Error in 226ms
2065
+  (0.2ms) rollback transaction
2066
+  (0.2ms) begin transaction
2067
+ --------------------------------------------------------------------------------------
2068
+ PUT /failures/:id/retry: test_0001_retries the failure and remove the original message
2069
+ --------------------------------------------------------------------------------------
2070
+ Processing by ResqueWeb::FailuresController#retry as HTML
2071
+ Parameters: {"id"=>"123"}
2072
+ Redirected to http://test.host/resque_web/failures
2073
+ Completed 302 Found in 2ms (ActiveRecord: 0.0ms)
2074
+  (0.3ms) rollback transaction
2075
+  (0.2ms) begin transaction
2076
+ -------------------------------------------------------------------------------------
2077
+ PUT /failures/:id/retry: test_0002_retries should work also in case of pre 2.0 Resque
2078
+ -------------------------------------------------------------------------------------
2079
+ Processing by ResqueWeb::FailuresController#retry as HTML
2080
+ Parameters: {"id"=>"123"}
2081
+ Redirected to http://test.host/resque_web/failures
2082
+ Completed 302 Found in 2ms (ActiveRecord: 0.0ms)
2083
+  (0.2ms) rollback transaction
2084
+  (0.3ms) begin transaction
2085
+ -------------------------------------------------------------------------------------------
2086
+ PUT /failures/retry_all: test_0001_retries all failures using requeue if no queue specified
2087
+ -------------------------------------------------------------------------------------------
2088
+ Processing by ResqueWeb::FailuresController#retry_all as HTML
2089
+ Redirected to http://test.host/resque_web/failures
2090
+ Completed 302 Found in 2ms (ActiveRecord: 0.0ms)
2091
+  (0.2ms) rollback transaction
2092
+  (0.2ms) begin transaction
2093
+ -----------------------------------------------------------------------------------------------
2094
+ PUT /failures/retry_all: test_0002_retries all failures should also work case of pre 2.0 Resque
2095
+ -----------------------------------------------------------------------------------------------
2096
+ Processing by ResqueWeb::FailuresController#retry_all as HTML
2097
+ Redirected to http://test.host/resque_web/failures
2098
+ Completed 302 Found in 1ms (ActiveRecord: 0.0ms)
2099
+  (0.3ms) rollback transaction
2100
+  (0.1ms) begin transaction
2101
+ ----------------------------------------------------------------------------------------------
2102
+ PUT /failures/retry_all: test_0003_retries all failures using requeue_queue if queue specified
2103
+ ----------------------------------------------------------------------------------------------
2104
+ Processing by ResqueWeb::FailuresController#retry_all as HTML
2105
+ Parameters: {"queue"=>"myqueue"}
2106
+ Redirected to http://test.host/resque_web/failures?queue=myqueue
2107
+ Completed 302 Found in 1ms (ActiveRecord: 0.0ms)
2108
+  (0.3ms) rollback transaction
2109
+  (0.3ms) begin transaction
2110
+ ---------------------------------------------------------
2111
+ ResqueWeb::QueuesControllerTest: test_0001_deletes queues
2112
+ ---------------------------------------------------------
2113
+ Processing by ResqueWeb::QueuesController#destroy as HTML
2114
+ Parameters: {"id"=>"example_queue"}
2115
+ Redirected to http://test.host/resque_web/queues
2116
+ Completed 302 Found in 3ms (ActiveRecord: 0.0ms)
2117
+  (0.3ms) rollback transaction
@@ -0,0 +1 @@
1
+ 23974
@@ -2,13 +2,15 @@ require 'test_helper'
2
2
 
3
3
  module ResqueWeb
4
4
  class FailuresControllerTest < ActionController::TestCase
5
+ include ControllerTestHelpers
6
+
5
7
  setup do
6
8
  @routes = Engine.routes
7
9
  end
8
10
 
9
11
  describe "GET /failures" do
10
12
  it "renders the index page" do
11
- get :index
13
+ visit(:index)
12
14
  assert_template :index
13
15
  end
14
16
  end
@@ -16,7 +18,7 @@ module ResqueWeb
16
18
  describe "DELETE /failures/:id" do
17
19
  it "deletes the failure" do
18
20
  Resque::Failure.expects(:remove).with('123')
19
- delete :destroy, :id=>123
21
+ visit(:destroy, {:id => 123}, :method => :delete)
20
22
  assert_redirected_to failures_path
21
23
  end
22
24
  end
@@ -24,7 +26,7 @@ module ResqueWeb
24
26
  describe "DELETE /failures/destroy_all" do
25
27
  it "deletes all failures" do
26
28
  Resque::Failure.expects(:clear).with('failed')
27
- delete :destroy_all
29
+ visit(:destroy_all, nil, :method => :delete)
28
30
  assert_redirected_to failures_path
29
31
  end
30
32
  end
@@ -32,13 +34,13 @@ module ResqueWeb
32
34
  describe "PUT /failures/:id/retry" do
33
35
  it "retries the failure and remove the original message" do
34
36
  Resque::Failure.expects(:requeue_and_remove).with('123')
35
- put :retry,:id=>123
37
+ visit(:retry, {:id => 123}, :method => :put)
36
38
  assert_redirected_to failures_path
37
39
  end
38
40
  it "retries should work also in case of pre 2.0 Resque" do
39
41
  Resque::Failure.expects(:requeue).with('123')
40
42
  Resque::Failure.expects(:remove).with('123')
41
- put :retry,:id=>123
43
+ visit(:retry, {:id => 123}, :method => :put)
42
44
  assert_redirected_to failures_path
43
45
  end
44
46
  end
@@ -49,7 +51,7 @@ module ResqueWeb
49
51
  Resque::Failure.stubs(:requeue_and_remove).returns(true)
50
52
  Resque::Failure.expects(:requeue_and_remove).with(0)
51
53
  Resque::Failure.expects(:requeue_and_remove).with(1)
52
- put :retry_all
54
+ visit(:retry_all, nil, :method => :put)
53
55
  assert_redirected_to failures_path
54
56
  end
55
57
  it "retries all failures should also work case of pre 2.0 Resque" do
@@ -59,15 +61,14 @@ module ResqueWeb
59
61
  Resque::Failure.expects(:remove).with(0)
60
62
  Resque::Failure.expects(:requeue).with(1)
61
63
  Resque::Failure.expects(:remove).with(1)
62
- put :retry_all
64
+ visit(:retry_all, nil, :method => :put)
63
65
  assert_redirected_to failures_path
64
66
  end
65
67
  it "retries all failures using requeue_queue if queue specified" do
66
68
  Resque::Failure.expects(:requeue_queue).with('myqueue')
67
- put :retry_all,:queue=>"myqueue"
69
+ visit(:retry_all, {:queue=>"myqueue"}, :method => :put)
68
70
  assert_redirected_to failures_path(:queue=>'myqueue')
69
71
  end
70
72
  end
71
-
72
73
  end
73
74
  end