       spec: spec]
   end
 
-  setup context do
+  setup [:create_motherboard]
+
+  defp create_motherboard(context) do
     comp_params = %{
       component_type: context.mobo_type,
       spec_id: context.spec.spec_id}

    end
  end

  # REVIEW: Related to T409; move to motherboard tests
  test "delete is idempotent and removes every slot", %{mobo: mobo} do
    refute [] === MotherboardSlotController.find_by(motherboard_id: mobo.motherboard_id)

    # MotherboardSlotController.delete_all_from_motherboard(mobo.motherboard_id)
    # MotherboardSlotController.delete_all_from_motherboard(mobo.motherboard_id)
    MotherboardController.delete(mobo.motherboard_id)

    assert [] === MotherboardSlotController.find_by(motherboard_id: mobo.motherboard_id)
  end

  describe "link" do
    test "connecting a component into slot", %{slot: slot} do
      component = component_for(slot)

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

    test "failure when component is already used", context0 do
       {:ok, keywords} = create_motherboard(context0)

       slot0 = context0.slot
       slot1 = Keyword.get(keywords, :slot)
       component = component_for(slot0)
       MotherboardSlotController.link(slot0.slot_id, component.component_id)

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

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