<?php

use App\Provisioning\StepResult;

it('builds advance, retry and fail results', function () {
    expect(StepResult::advance()->type)->toBe(StepResult::ADVANCE);

    $retry = StepResult::retry(30, 'wait');
    expect($retry->type)->toBe(StepResult::RETRY)
        ->and($retry->afterSeconds)->toBe(30)
        ->and($retry->reason)->toBe('wait');

    expect(StepResult::fail('boom')->reason)->toBe('boom');
});
