##// END OF EJS Templates
remove trailing white-spaces from test/integration/api_test/news_test.rb....
Toshi MARUYAMA -
r6553:50f7af6b9339
parent child
Show More
@@ -1,16 +1,16
1 1 # Redmine - project management software
2 # Copyright (C) 2006-2010 Jean-Philippe Lang
2 # Copyright (C) 2006-2011 Jean-Philippe Lang
3 3 #
4 4 # This program is free software; you can redistribute it and/or
5 5 # modify it under the terms of the GNU General Public License
6 6 # as published by the Free Software Foundation; either version 2
7 7 # of the License, or (at your option) any later version.
8 #
8 #
9 9 # This program is distributed in the hope that it will be useful,
10 10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 12 # GNU General Public License for more details.
13 #
13 #
14 14 # You should have received a copy of the GNU General Public License
15 15 # along with this program; if not, write to the Free Software
16 16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -28,7 +28,7 class ApiTest::NewsTest < ActionController::IntegrationTest
28 28 context ".xml" do
29 29 should "return news" do
30 30 get '/news.xml'
31
31
32 32 assert_tag :tag => 'news',
33 33 :attributes => {:type => 'array'},
34 34 :child => {
@@ -40,11 +40,11 class ApiTest::NewsTest < ActionController::IntegrationTest
40 40 }
41 41 end
42 42 end
43
43
44 44 context ".json" do
45 45 should "return news" do
46 46 get '/news.json'
47
47
48 48 json = ActiveSupport::JSON.decode(response.body)
49 49 assert_kind_of Hash, json
50 50 assert_kind_of Array, json['news']
@@ -57,10 +57,10 class ApiTest::NewsTest < ActionController::IntegrationTest
57 57 context "GET /projects/:project_id/news" do
58 58 context ".xml" do
59 59 should_allow_api_authentication(:get, "/projects/onlinestore/news.xml")
60
60
61 61 should "return news" do
62 62 get '/projects/ecookbook/news.xml'
63
63
64 64 assert_tag :tag => 'news',
65 65 :attributes => {:type => 'array'},
66 66 :child => {
@@ -72,13 +72,13 class ApiTest::NewsTest < ActionController::IntegrationTest
72 72 }
73 73 end
74 74 end
75
75
76 76 context ".json" do
77 77 should_allow_api_authentication(:get, "/projects/onlinestore/news.json")
78
78
79 79 should "return news" do
80 80 get '/projects/ecookbook/news.json'
81
81
82 82 json = ActiveSupport::JSON.decode(response.body)
83 83 assert_kind_of Hash, json
84 84 assert_kind_of Array, json['news']
@@ -87,7 +87,7 class ApiTest::NewsTest < ActionController::IntegrationTest
87 87 end
88 88 end
89 89 end
90
90
91 91 def credentials(user, password=nil)
92 92 ActionController::HttpAuthentication::Basic.encode_credentials(user, password || user)
93 93 end
General Comments 0
You need to be logged in to leave comments. Login now