Skip to content
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

AssertObjectExists could also check for the type of object #195

Open
mverbaas opened this issue Jul 7, 2023 · 0 comments
Open

AssertObjectExists could also check for the type of object #195

mverbaas opened this issue Jul 7, 2023 · 0 comments

Comments

@mverbaas
Copy link

mverbaas commented Jul 7, 2023

AssertObjectExists could also check of the object type. Now you can miss a test if there is, for example a table and a view with the same name.

CREATE TABLE dbo.orders (c1 int)

and

CREATE VIEW dbo.orders as SELECT c1 FROM dbo.orders

Both would succeed with
EXEC tSQLt.AssertObjectExists @ObjectName = N'dbo.orders'

Adding an optional type checker U or V could maybe make the assertion more specific.

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

No branches or pull requests

1 participant