Skip to content

Commit

Permalink
Add a test for "consolidate timestamp macros". (#200)
Browse files Browse the repository at this point in the history
### Description

Adds a test for "consolidate timestamp macros" at dbt-labs/dbt-spark#480.
  • Loading branch information
ueshin committed Oct 3, 2022
1 parent d54f406 commit 9868719
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tests/functional/adapter/utils/test_timestamps.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import pytest
from dbt.tests.adapter.utils.test_timestamps import BaseCurrentTimestamps


class TestCurrentTimestampDatabricks(BaseCurrentTimestamps):
@pytest.fixture(scope="class")
def models(self):
return {
"get_current_timestamp.sql": "select {{ current_timestamp() }} as current_timestamp"
}

@pytest.fixture(scope="class")
def expected_schema(self):
return {"current_timestamp": "timestamp"}

@pytest.fixture(scope="class")
def expected_sql(self):
return """select current_timestamp() as current_timestamp"""

0 comments on commit 9868719

Please sign in to comment.