]> source.dussan.org Git - redmine.git/commitdiff
add functional calendar test of same start and due dates issue
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Fri, 13 Nov 2020 12:41:05 +0000 (12:41 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Fri, 13 Nov 2020 12:41:05 +0000 (12:41 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@20363 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/functional/calendars_controller_test.rb

index 6e82019eca61dd9b6c78b3f596039ff83dfd51ac..e3b6caad5faf5e41fef133d9a0a7f14b2137b4dd 100644 (file)
@@ -104,6 +104,45 @@ class CalendarsControllerTest < Redmine::ControllerTest
     end
   end
 
+  test "show issue of start and due dates are same" do
+    subject = 'start and due dates are same'
+    issue = Issue.generate!(:start_date => '2012-10-06',
+                            :due_date   => '2012-10-06',
+                            :project_id => 1, :tracker_id => 1,
+                            :subject => subject)
+    get(
+      :show,
+      :params => {
+        :project_id => 1,
+        :month => '10',
+        :year => '2012'
+      }
+    )
+    assert_response :success
+
+    assert_select 'table.cal' do
+      assert_select 'tr' do
+        assert_select 'td' do
+          assert_select(
+            'div.issue.hascontextmenu.tooltip.starting.ending',
+            :text => /#{subject}/
+          ) do
+            assert_select(
+              'a.issue[href=?]', "/issues/#{issue.id}",
+              :text => "Bug ##{issue.id}"
+            )
+            assert_select(
+              'input[name=?][type=?][value=?]',
+              'ids[]',
+              'checkbox',
+              issue.id.to_s
+            )
+          end
+        end
+      end
+    end
+  end
+
   def test_show_version
     travel_to versions(:versions_002).effective_date