mirror of
https://github.com/meineerde/redmine.git
synced 2025-12-24 09:21:12 +00:00
Remove trailing whitespaces from test/test_helper.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@18220 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
3be6fea8e2
commit
7f110f7277
@ -254,14 +254,14 @@ end
|
||||
module Redmine
|
||||
class MockFile
|
||||
attr_reader :size, :original_filename, :content_type
|
||||
|
||||
|
||||
def initialize(options={})
|
||||
@size = options[:size] || 32
|
||||
@original_filename = options[:original_filename] || options[:filename]
|
||||
@content_type = options[:content_type]
|
||||
@content = options[:content] || 'x'*size
|
||||
end
|
||||
|
||||
|
||||
def read(*args)
|
||||
if @eof
|
||||
false
|
||||
@ -308,12 +308,12 @@ module Redmine
|
||||
ids = css_select('tr.issue td.id').map(&:text).map(&:to_i)
|
||||
Issue.where(:id => ids).sort_by {|issue| ids.index(issue.id)}
|
||||
end
|
||||
|
||||
|
||||
# Return the columns that are displayed in the issue list
|
||||
def columns_in_issues_list
|
||||
css_select('table.issues thead th:not(.checkbox)').map(&:text).select(&:present?)
|
||||
end
|
||||
|
||||
|
||||
# Return the columns that are displayed in the list
|
||||
def columns_in_list
|
||||
css_select('table.list thead th:not(.checkbox)').map(&:text).select(&:present?)
|
||||
@ -328,7 +328,7 @@ module Redmine
|
||||
def assert_query_filters(expected_filters)
|
||||
response.body =~ /initFilters\(\);\s*((addFilter\(.+\);\s*)*)/
|
||||
filter_init = $1.to_s
|
||||
|
||||
|
||||
expected_filters.each do |field, operator, values|
|
||||
s = "addFilter(#{field.to_json}, #{operator.to_json}, #{Array(values).to_json});"
|
||||
assert_include s, filter_init
|
||||
@ -437,7 +437,7 @@ module Redmine
|
||||
request = arg.keys.detect {|key| key.is_a?(String)}
|
||||
raise ArgumentError unless request
|
||||
options = arg.slice!(request)
|
||||
|
||||
|
||||
API_FORMATS.each do |format|
|
||||
format_request = request.sub /$/, ".#{format}"
|
||||
super options.merge(format_request => arg[request], :format => format)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user