This directory contains an example dbt project which tests the macros in the dbt-utils
package. An integration test typically involves making 1) a new seed file 2) a new model file 3) a schema test.
For an example integration tests, check out the tests for the get_url_parameter
macro:
- Macro definition
- Seed file with fake data
- Model to test the macro
- A schema test to assert the macro works as expected
Once you've added all of these files, you should be able to run:
$ dbt seed
$ dbt run --model {your_model_name}
$ dbt test --model {your_model_name}
If the tests all pass, then you're good to go! All tests will be run automatically when you create a PR against this repo.