summaryrefslogtreecommitdiffstats
path: root/test/unit/lib
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2011-08-30 07:53:59 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2011-08-30 07:53:59 +0000
commit98e7d125f160ead0112212caa3ff21c463e97f22 (patch)
treef1ac046d403fadd3fbed9c1af7e30fdec101b5fa /test/unit/lib
parent5bf8d3250399c91ef0a9a5c335b3c0b87b8c2f0e (diff)
downloadredmine-98e7d125f160ead0112212caa3ff21c463e97f22.tar.gz
redmine-98e7d125f160ead0112212caa3ff21c463e97f22.zip
remove trailing white-spaces from test/unit/lib/redmine/helpers/gantt_test.rb.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6788 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/lib')
-rw-r--r--test/unit/lib/redmine/helpers/gantt_test.rb52
1 files changed, 26 insertions, 26 deletions
diff --git a/test/unit/lib/redmine/helpers/gantt_test.rb b/test/unit/lib/redmine/helpers/gantt_test.rb
index fa8f9329a..24aeae824 100644
--- a/test/unit/lib/redmine/helpers/gantt_test.rb
+++ b/test/unit/lib/redmine/helpers/gantt_test.rb
@@ -5,12 +5,12 @@
# 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.
@@ -26,7 +26,7 @@ class Redmine::Helpers::GanttTest < ActiveSupport::TestCase
include ApplicationHelper
include ProjectsHelper
include IssuesHelper
-
+
def self.default_url_options
{:only_path => true }
end
@@ -78,7 +78,7 @@ class Redmine::Helpers::GanttTest < ActiveSupport::TestCase
5.times do
Issue.generate_for_project!(p)
end
-
+
create_gantt(p)
@gantt.render
assert_equal 6, @gantt.number_of_rows
@@ -109,7 +109,7 @@ class Redmine::Helpers::GanttTest < ActiveSupport::TestCase
version = Version.generate!
@project.versions << version
@project.issues << Issue.generate_for_project!(@project, :fixed_version => version)
-
+
assert_equal 3, @gantt.number_of_rows_on_project(@project)
end
end
@@ -131,56 +131,56 @@ class Redmine::Helpers::GanttTest < ActiveSupport::TestCase
:done_ratio => 30,
:start_date => Date.yesterday,
:due_date => 1.week.from_now.to_date)
- @project.issues << @issue
+ @project.issues << @issue
end
-
+
context "project" do
should "be rendered" do
@response.body = @gantt.subjects
assert_select "div.project-name a", /#{@project.name}/
end
-
+
should "have an indent of 4" do
@response.body = @gantt.subjects
assert_select "div.project-name[style*=left:4px]"
end
end
-
+
context "version" do
should "be rendered" do
@response.body = @gantt.subjects
assert_select "div.version-name a", /#{@version.name}/
end
-
+
should "be indented 24 (one level)" do
@response.body = @gantt.subjects
assert_select "div.version-name[style*=left:24px]"
end
-
+
context "without assigned issues" do
setup do
@version = Version.generate!(:effective_date => 2.week.from_now.to_date, :sharing => 'none', :name => 'empty_version')
@project.versions << @version
end
-
+
should "not be rendered" do
@response.body = @gantt.subjects
assert_select "div.version-name a", :text => /#{@version.name}/, :count => 0
end
end
end
-
+
context "issue" do
should "be rendered" do
@response.body = @gantt.subjects
assert_select "div.issue-subject", /#{@issue.subject}/
end
-
+
should "be indented 44 (two levels)" do
@response.body = @gantt.subjects
assert_select "div.issue-subject[style*=left:44px]"
end
-
+
context "assigned to a shared version of another project" do
setup do
p = Project.generate!
@@ -189,7 +189,7 @@ class Redmine::Helpers::GanttTest < ActiveSupport::TestCase
@shared_version = Version.generate!(:sharing => 'system')
p.versions << @shared_version
# Reassign the issue to a shared version of another project
-
+
@issue = Issue.generate!(:fixed_version => @shared_version,
:subject => "gantt#assigned_to_shared_version",
:tracker => @tracker,
@@ -199,13 +199,13 @@ class Redmine::Helpers::GanttTest < ActiveSupport::TestCase
:due_date => 1.week.from_now.to_date)
@project.issues << @issue
end
-
+
should "be rendered" do
@response.body = @gantt.subjects
assert_select "div.issue-subject", /#{@issue.subject}/
end
end
-
+
context "with subtasks" do
setup do
attrs = {:project => @project, :tracker => @tracker, :fixed_version => @version}
@@ -213,7 +213,7 @@ class Redmine::Helpers::GanttTest < ActiveSupport::TestCase
@child2 = Issue.generate!(attrs.merge(:subject => 'child2', :parent_issue_id => @issue.id, :start_date => Date.today, :due_date => 1.week.from_now.to_date))
@grandchild = Issue.generate!(attrs.merge(:subject => 'grandchild', :parent_issue_id => @child1.id, :start_date => Date.yesterday, :due_date => 2.day.from_now.to_date))
end
-
+
should "indent subtasks" do
@response.body = @gantt.subjects
# parent task 44px
@@ -291,7 +291,7 @@ class Redmine::Helpers::GanttTest < ActiveSupport::TestCase
setup do
create_gantt
end
-
+
context ":html format" do
should "add an absolute positioned div" do
@response.body = @gantt.subject_for_project(@project, {:format => :html})
@@ -416,7 +416,7 @@ class Redmine::Helpers::GanttTest < ActiveSupport::TestCase
assert_select "div.project.ending[style*=left:88px]", true, @response.body
end
end
-
+
context "status content" do
should "appear at the far left, even if it's far in the past" do
@gantt.instance_variable_set('@date_to', 2.weeks.ago.to_date)
@@ -583,7 +583,7 @@ class Redmine::Helpers::GanttTest < ActiveSupport::TestCase
assert_select "div.version.ending[style*=left:88px]", true, @response.body
end
end
-
+
context "status content" do
should "appear at the far left, even if it's far in the past" do
@gantt.instance_variable_set('@date_to', 2.weeks.ago.to_date)
@@ -715,12 +715,12 @@ class Redmine::Helpers::GanttTest < ActiveSupport::TestCase
should "not be the total done width if the chart starts after issue start date" do
create_gantt(@project, :date_from => 5.days.ago.to_date)
-
+
@response.body = @gantt.line_for_issue(@issue, {:format => :html, :zoom => 4})
assert_select "div.task_done[style*=left:0px]", true, @response.body
assert_select "div.task_done[style*=width:8px]", true, @response.body
end
-
+
context "for completed issue" do
setup do
@issue.done_ratio = 100
@@ -730,7 +730,7 @@ class Redmine::Helpers::GanttTest < ActiveSupport::TestCase
@response.body = @gantt.line_for_issue(@issue, {:format => :html, :zoom => 4})
assert_select "div.task_done[style*=width:58px]", true, @response.body
end
-
+
should "be the total width of the issue with due_date=start_date" do
@issue.due_date = @issue.start_date
@response.body = @gantt.line_for_issue(@issue, {:format => :html, :zoom => 4})
@@ -775,5 +775,5 @@ class Redmine::Helpers::GanttTest < ActiveSupport::TestCase
context "#to_pdf" do
should "be tested"
end
-
+
end