def test_update_boat_no_id(superuser_api_client, boat):
    variables = {"name": "foobar"}
    assert Boat.objects.count() == 1

    executed = superuser_api_client.execute(UPDATE_BOAT_MUTATION, input=variables)

    assert Boat.objects.count() == 1
    assert_field_missing("id", executed)
def test_update_winter_storage_application_no_application_id(
        api_client, customer_profile):
    variables = {
        "customerId": to_global_id(ProfileNode, customer_profile.id),
    }

    executed = api_client.execute(UPDATE_WINTER_STORAGE_APPLICATION_MUTATION,
                                  input=variables)

    assert_field_missing("id", executed)
def test_update_berth_service_profile_no_id(superuser_api_client, customer_profile):
    variables = {"comment": "This is not gonna work..."}
    assert CustomerProfile.objects.count() == 1

    executed = superuser_api_client.execute(
        UPDATE_BERTH_SERVICE_PROFILE_MUTATION, input=variables
    )

    assert CustomerProfile.objects.count() == 1
    assert_field_missing("id", executed)
def test_create_boat_no_boat_type(superuser_api_client):
    variables = {
        "ownerId": to_global_id(ProfileNode, uuid.uuid4()),
    }
    assert Boat.objects.count() == 0

    executed = superuser_api_client.execute(CREATE_BOAT_MUTATION, input=variables)

    assert Boat.objects.count() == 0
    assert_field_missing("boatType", executed)
def test_create_winter_storage_product_no_price_value(superuser_api_client):
    variables = {
        "winterStorageAreaId": to_global_id(WinterStorageAreaNode, uuid.uuid4()),
    }

    assert WinterStorageProduct.objects.count() == 0

    executed = superuser_api_client.execute(
        CREATE_WINTER_STORAGE_PRODUCT_MUTATION, input=variables
    )

    assert WinterStorageProduct.objects.count() == 0
    assert_field_missing("priceValue", executed)