diff --git a/test/fixtures/not-old-django/requirements.txt b/test/fixtures/not-old-django/requirements.txt new file mode 100644 index 0000000..52a0c57 --- /dev/null +++ b/test/fixtures/not-old-django/requirements.txt @@ -0,0 +1,2 @@ +pwned-passwords-django==1.4 +Django==2.1 diff --git a/test/fixtures/old-django/requirements.txt b/test/fixtures/old-django/requirements.txt new file mode 100644 index 0000000..f305b2f --- /dev/null +++ b/test/fixtures/old-django/requirements.txt @@ -0,0 +1 @@ +Django==1.11 diff --git a/test/run-features b/test/run-features index c3ee1f2..8982eb0 100755 --- a/test/run-features +++ b/test/run-features @@ -74,6 +74,18 @@ testNoRequirements() { assertCapturedError } +testWarnOldDjango() { + compile "old-django" + assertCaptured "Your Django version is nearing the end of its community support." + assertCapturedSuccess +} + +testDontWarnOldDjango() { + compile "not-old-django" + assertNotCaptured "Your Django version is nearing the end of its community support." + assertCapturedSuccess +} + pushd $(dirname 0) >/dev/null popd >/dev/null