     [
       component_types: types,
       slot_type: slot_type,
-      mobo_type: mobo_type,
       spec: spec]
   end
 
-  setup context do
+  setup %{spec: spec} do
+    {:ok, mobo} = create_motherboard(spec.spec_id)
+    slot =
+      mobo.motherboard_id
+      |> MotherboardController.get_slots()
+      |> List.first()
+
+    {:ok, slot: slot, mobo: mobo}
+  end
+
+  defp create_motherboard(spec_id) do
     comp_params = %{
-      component_type: context.mobo_type,
-      spec_id: context.spec.spec_id}
+      component_type: "mobo",
+      spec_id: spec_id}
     {:ok, comp} = ComponentController.create(comp_params)
 
     mobo_params = %{motherboard_id: comp.component_id}
     {:ok, mobo} = MotherboardController.create(mobo_params)
     mobo = Repo.preload(mobo, :component_spec)
 
-    slot =
-      MotherboardSlotController.find_by(motherboard_id: mobo.motherboard_id)
-      |> List.first()
-
-    {:ok, slot: slot, mobo: mobo}
+    {:ok, mobo}
   end
 
   defp component_type(name) do

      assert {:error, :slot_already_linked} === MotherboardSlotController.link(slot.slot_id, component.component_id)
    end

    # REVIEW: T409
    # test "failure when component is already used", %{slot: slot, mobo: mobo} do
    #   component = component_for(slot)

    #   slot_params = %{
    #     motherboard_id: mobo.motherboard_id,
    #     link_component_type: mobo.component_spec.component_type,
    #     slot_internal_id: Burette.Number.digits(8),
    #     link_component_id: component.component_id
    #   }

    #   MotherboardSlotController.create(slot_params)

    #   assert {:error, :component_already_linked} === MotherboardSlotController.link(slot.slot_id, component.component_id)
    # end
  end

  test "unlink is idempotent", %{slot: slot} do

    end

    slot_type = Enum.random(["ram", "cpu", "hdd"])

    component_type(slot_type)
    component_type("mobo")

    slot_number = Burette.Number.digits(4)
    spec_params = %{
      component_type: "mobo",
      spec: %{
        spec_type: "mobo",
        spec_code: Random.string(min: 20, max: 20),
        slots: %{
          slot_number => %{type: slot_type}
