1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-07-19 05:09:38 +02:00
Maybe/test/interfaces/syncable_interface_test.rb

21 lines
481 B
Ruby
Raw Normal View History

require "test_helper"
module SyncableInterfaceTest
extend ActiveSupport::Testing::Declarative
include ActiveJob::TestHelper
test "can sync later" do
assert_difference "@syncable.syncs.count", 1 do
assert_enqueued_with job: SyncJob do
2025-05-26 05:39:14 -04:00
@syncable.sync_later
end
end
end
test "can perform sync" do
mock_sync = mock
@syncable.class.any_instance.expects(:perform_sync).with(mock_sync).once
@syncable.perform_sync(mock_sync)
end
end