如何在Go中模拟SQL更新

I'm trying to write a unit test for updating record in postgresql in golang

database function is

CREATE OR REPLACE FUNCTION test.update(param_id text, param_data jsonb, id2 text) RETURNS void AS
$$
BEGIN
    UPDATE test.test_table
    SET data = param_data,
    WHERE id = (SELECT id FROM test.test_table2 WHERE name = id2)
END;
$$
LANGUAGE plpgsql;

Unit test is

rows := sqlmock.NewRows([]string{"result"}).AddRow("")

mock.ExpectBegin()
mock.ExpectQuery(fmt.Sprintf("SELECT %v.update(.+)", schema)).WithArgs(1, data).WillReturnRows(rows)
mock.ExpectCommit()

Do I also need to mock the select query inside? How can I mock a void function?

I've used the following package

import (sql "database/sql")

this enables me to check the following,

.... var rows sql.Result ... <execute query > ... rows.RowsAffected()

rows.RowsAffected() provides the number of rows updated.