## Tests for Balloon — state machine transitions.
extends GutTest

var _balloon: Balloon


func before_each() -> void:
	_balloon = Balloon.new()
	add_child_autofree(_balloon)


func test_initial_state_is_idle() -> void:
	assert_eq(_balloon._state, Balloon.State.IDLE)


func test_start_pop_transitions_to_popping() -> void:
	_balloon._start_pop()
	assert_eq(_balloon._state, Balloon.State.POPPING)


func test_on_pop_complete_transitions_to_popped() -> void:
	_balloon._on_pop_complete()
	assert_eq(_balloon._state, Balloon.State.POPPED)


func test_on_respawn_complete_transitions_to_idle() -> void:
	_balloon._state = Balloon.State.RESPAWNING
	_balloon._on_respawn_complete()
	assert_eq(_balloon._state, Balloon.State.IDLE)
