tSQLt-org / tSQLt

The official tSQLt repository. (Download at: http://tSQLt.org/downloads )
http://tSQLt.org
413 stars 102 forks source link

Redundancy in the last example of the tutorial #164

Closed shepard8 closed 2 years ago

shepard8 commented 2 years ago

In the tutorial (https://tsqlt.org/user-guide/tsqlt-tutorial/)

The last example ends with:

IF (@errorThrown = 0 OR (EXISTS (SELECT 1 FROM FinancialApp.Sales)))
BEGIN
    EXEC tSQLt.Fail 'Sales table should not allow invalid currency';
END;

IF EXISTS (SELECT 1 FROM FinancialApp.Sales)
    EXEC tSQLt.Fail 'Sales table should not allow invalid currency';

The two last lines are unnecessary since this is tested already just above. This is a small issue but the tutorial should show how easy it is to use the tool, which is why I believe these useless lines are bad :smile:

Regards,

JerryNixon commented 2 years ago

I've removed this section. You are correct. The update will show in the new docs.

JerryNixon commented 2 years ago

https://github.com/tSQLt-org/tSQLt/pull/171