Files
Bubberstation/code/modules/unit_tests/machine_disassembly.dm
SkyratBot 926c5f519b [MIRROR] Fixes incapacitating sleep test failure, general test touch ups. (#1890)
* Fixes incapacitating sleep test failure, general test touch ups. (#55196)

Fixes the random incapacitating sleep test failure
Tests now provide the option to use a custom turf, by default uses plasteel tiles instead of space
Tests now reserve turf instead of just using a corner in CentCom (which had unaccounted for tiles)

* Fixes incapacitating sleep test failure, general test touch ups.

Co-authored-by: Jared-Fogle <35135081+Jared-Fogle@users.noreply.github.com>
2020-11-28 12:52:18 +01:00

13 lines
674 B
Plaintext

/// Ensures that when disassembling a machine, all the parts are given back
/datum/unit_test/machine_disassembly/Run()
var/obj/machinery/freezer = allocate(/obj/machinery/atmospherics/components/unary/thermomachine/freezer)
var/turf/freezer_location = freezer.loc
freezer.deconstruct()
// Check that the components are created
TEST_ASSERT(locate(/obj/item/stock_parts/micro_laser) in freezer_location, "Couldn't find micro-laser when disassembling freezer")
// Check that the circuit board itself is created
TEST_ASSERT(locate(/obj/item/circuitboard/machine/thermomachine/freezer) in freezer_location, "Couldn't find the circuit board when disassembling freezer")