##// END OF EJS Templates
Set radio button when selecting a date with the date picker....
Set radio button when selecting a date with the date picker. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10284 e93f8b46-1217-0410-a6f0-8f06a7374b81

File last commit:

r9830:537be80be26c
r10101:1b64e4be5ea8
Show More
attachments_test.rb
69 lines | 3.0 KiB | text/x-ruby | RubyLexer
Toshi MARUYAMA
test: route: move attachments test to new file...
r8198 # Redmine - project management software
Jean-Philippe Lang
Copyright update....
r9453 # Copyright (C) 2006-2012 Jean-Philippe Lang
Toshi MARUYAMA
test: route: move attachments test to new file...
r8198 #
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
require File.expand_path('../../../test_helper', __FILE__)
class RoutingAttachmentsTest < ActionController::IntegrationTest
def test_attachments
assert_routing(
{ :method => 'get', :path => "/attachments/1" },
{ :controller => 'attachments', :action => 'show', :id => '1' }
)
assert_routing(
{ :method => 'get', :path => "/attachments/1.xml" },
{ :controller => 'attachments', :action => 'show', :id => '1', :format => 'xml' }
)
assert_routing(
{ :method => 'get', :path => "/attachments/1.json" },
{ :controller => 'attachments', :action => 'show', :id => '1', :format => 'json' }
)
assert_routing(
{ :method => 'get', :path => "/attachments/1/filename.ext" },
{ :controller => 'attachments', :action => 'show', :id => '1',
:filename => 'filename.ext' }
)
assert_routing(
{ :method => 'get', :path => "/attachments/download/1" },
{ :controller => 'attachments', :action => 'download', :id => '1' }
)
assert_routing(
{ :method => 'get', :path => "/attachments/download/1/filename.ext" },
{ :controller => 'attachments', :action => 'download', :id => '1',
:filename => 'filename.ext' }
)
Jean-Philippe Lang
Displays thumbnails of attached images of the issue view (#1006)....
r9750 assert_routing(
{ :method => 'get', :path => "/attachments/thumbnail/1" },
{ :controller => 'attachments', :action => 'thumbnail', :id => '1' }
)
Jean-Philippe Lang
Adds a macro for inserting thumbnails in formatted text (#3510)....
r9830 assert_routing(
{ :method => 'get', :path => "/attachments/thumbnail/1/200" },
{ :controller => 'attachments', :action => 'thumbnail', :id => '1', :size => '200' }
)
Toshi MARUYAMA
test: route: add attachment delete method test...
r8410 assert_routing(
{ :method => 'delete', :path => "/attachments/1" },
{ :controller => 'attachments', :action => 'destroy', :id => '1' }
)
Jean-Philippe Lang
Adds support for adding attachments to issues through the REST API (#8171)....
r8808 assert_routing(
{ :method => 'post', :path => '/uploads.xml' },
{ :controller => 'attachments', :action => 'upload', :format => 'xml' }
)
assert_routing(
{ :method => 'post', :path => '/uploads.json' },
{ :controller => 'attachments', :action => 'upload', :format => 'json' }
)
Toshi MARUYAMA
test: route: move attachments test to new file...
r8198 end
end