- closed_note_with_comment = create(:note_with_comments, :status => "closed", :closed_at => Time.now)
+ closed_note_with_comment = create(:note_with_comments, :status => "closed", :closed_at => Time.now.utc)
assert_no_difference "NoteComment.count" do
post comment_note_path(:id => closed_note_with_comment, :text => "This is an additional comment"), :headers => auth_header
assert_no_difference "NoteComment.count" do
post comment_note_path(:id => closed_note_with_comment, :text => "This is an additional comment"), :headers => auth_header
- closed_note_with_comment = create(:note_with_comments, :status => "closed", :closed_at => Time.now)
+ closed_note_with_comment = create(:note_with_comments, :status => "closed", :closed_at => Time.now.utc)
post close_note_path(:id => closed_note_with_comment), :headers => auth_header
assert_response :conflict
end
def test_reopen_success
post close_note_path(:id => closed_note_with_comment), :headers => auth_header
assert_response :conflict
end
def test_reopen_success
- closed_note_with_comment = create(:note_with_comments, :status => "closed", :closed_at => Time.now)
+ closed_note_with_comment = create(:note_with_comments, :status => "closed", :closed_at => Time.now.utc)
user = create(:user)
post reopen_note_path(:id => closed_note_with_comment, :text => "This is a reopen comment", :format => "json")
user = create(:user)
post reopen_note_path(:id => closed_note_with_comment, :text => "This is a reopen comment", :format => "json")
assert_select "item", :count => 1 do
assert_select "link", browse_note_url(open_note)
assert_select "guid", note_url(open_note)
assert_select "item", :count => 1 do
assert_select "link", browse_note_url(open_note)
assert_select "guid", note_url(open_note)
# assert_select "geo:lat", open_note.lat.to_s
# assert_select "geo:long", open_note.lon
# assert_select "georss:point", "#{open_note.lon} #{open_note.lon}"
# assert_select "geo:lat", open_note.lat.to_s
# assert_select "geo:long", open_note.lon
# assert_select "georss:point", "#{open_note.lon} #{open_note.lon}"
- create(:note_with_comments, :status => "closed", :closed_at => Time.now - 5.days)
- create(:note_with_comments, :status => "closed", :closed_at => Time.now - 100.days)
+ create(:note_with_comments, :status => "closed", :closed_at => Time.now.utc - 5.days)
+ create(:note_with_comments, :status => "closed", :closed_at => Time.now.utc - 100.days)
create(:note_with_comments, :status => "hidden")
create(:note_with_comments)
create(:note_with_comments, :status => "hidden")
create(:note_with_comments)