Skip to content

Redundancy in the last example of the tutorial #164

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
shepard8 opened this issue Apr 21, 2022 · 2 comments
Closed

Redundancy in the last example of the tutorial #164

shepard8 opened this issue Apr 21, 2022 · 2 comments

Comments

@shepard8
Copy link

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 😄

Regards,

@JerryNixon
Copy link

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

@JerryNixon
Copy link

#171

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants