exec tSQLt.SetFakeViewOn 'dbo.viewWithIssues';
GO
CREATE PROCEDURE TestChanges.[Test Data]
AS
BEGIN
...
exec tSQLt.FakeTable 'dbo.viewWithIssues', @identity=1, @ComputedColumns=1, @Defaults=1;
INSERT INTO dbo.viewWithIssues (clock_id, IsTerminated)
VALUES ('1111', '0'), ('2222', '1'), ('3333', '1')
...
END
GO
exec tSQLt.SetFakeViewOff 'dbo.viewWithIssues';
GO
Then it goes on to populate #Actual and #Expected after a procedure is called. The error that it returns is: Update or Insert of view or function 'dbo.viewWithIssues' failed because it contains a derived or constant field.
Does anyone know how to get around this?