mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-27 12:28:48 +01:00
fix test where today and show_from did not have the same timezone and add test for OneNote links inspired by the tests for Mail.app links
This commit is contained in:
parent
07ef7ed7a8
commit
022a94f686
1 changed files with 12 additions and 1 deletions
|
|
@ -447,7 +447,7 @@ class TodosControllerTest < ActionController::TestCase
|
|||
assert !new_todo.show_from.nil?
|
||||
|
||||
next_month = today + 1.month
|
||||
assert_equal next_month.to_date.to_s(:db), new_todo.show_from.to_date.to_s(:db)
|
||||
assert_equal next_month.utc.to_date.to_s(:db), new_todo.show_from.utc.to_date.to_s(:db)
|
||||
end
|
||||
|
||||
def test_check_for_next_todo
|
||||
|
|
@ -550,4 +550,15 @@ class TodosControllerTest < ActionController::TestCase
|
|||
assert_select("div#notes_todo_#{todo.id} a", 'message://<ABCDEF-GHADB-123455-FOO-BAR@example.com>')
|
||||
assert_select("div#notes_todo_#{todo.id} a[href=message://<ABCDEF-GHADB-123455-FOO-BAR@example.com>]", 'message://<ABCDEF-GHADB-123455-FOO-BAR@example.com>')
|
||||
end
|
||||
|
||||
def test_format_note_link_onenote
|
||||
login_as(:admin_user)
|
||||
todo = users(:admin_user).todos.first
|
||||
todo.notes = ' "link me to onenote":onenote:///E:\OneNote\dir\notes.one#PAGE§ion-id={FD597D3A-3793-495F-8345-23D34A00DD3B}&page-id={1C95A1C7-6408-4804-B3B5-96C28426022B}&end'
|
||||
todo.save!
|
||||
get :index
|
||||
assert_select("div#notes_todo_#{todo.id}", 'link me to onenote')
|
||||
assert_select("div#notes_todo_#{todo.id} a", 'link me to onenote')
|
||||
assert_select("div#notes_todo_#{todo.id} a[href=onenote:///E:\\OneNote\\dir\\notes.one#PAGE&section-id={FD597D3A-3793-495F-8345-23D34A00DD3B}&page-id={1C95A1C7-6408-4804-B3B5-96C28426022B}&end]", 'link me to onenote')
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue