add bevy and phaser engine support
This commit is contained in:
@@ -31,5 +31,29 @@ RSpec.describe UpdateService do
|
||||
|
||||
expect(mock_service).to have_received(:update).with("game", "1.0")
|
||||
end
|
||||
|
||||
it "routes bevy platform to BevyService" do
|
||||
input = UpdateInputDto.new(platform: "bevy", name: "game", version: "1.0")
|
||||
mock_service = instance_double(SoftwareUpdater::BevyService)
|
||||
|
||||
allow(SoftwareUpdater::BevyService).to receive(:new).and_return(mock_service)
|
||||
allow(mock_service).to receive(:update)
|
||||
|
||||
described_class.new.update(input)
|
||||
|
||||
expect(mock_service).to have_received(:update).with("game", "1.0")
|
||||
end
|
||||
|
||||
it "routes phaser platform to PhaserService" do
|
||||
input = UpdateInputDto.new(platform: "phaser", name: "game", version: "1.0")
|
||||
mock_service = instance_double(SoftwareUpdater::PhaserService)
|
||||
|
||||
allow(SoftwareUpdater::PhaserService).to receive(:new).and_return(mock_service)
|
||||
allow(mock_service).to receive(:update)
|
||||
|
||||
described_class.new.update(input)
|
||||
|
||||
expect(mock_service).to have_received(:update).with("game", "1.0")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user