Skip to content

Commit

Permalink
MDLSITE-4678 tests: asserting ignorefiles expected behaviour
Browse files Browse the repository at this point in the history
  • Loading branch information
danpoltawski committed Jul 13, 2016
1 parent 54710cb commit 9ff9e98
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
27 changes: 27 additions & 0 deletions tests/fixtures/32-thirdparty-lib-added.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
From 4600d7d6fd5d5bd4f5bae80c3e89b838d95f2b1d Mon Sep 17 00:00:00 2001
From: Dan Poltawski <dan@moodle.com>
Date: Tue, 12 Jul 2016 11:23:56 +0100
Subject: [PATCH 1/1] MDLSITE-4678 fixture: adding third party lib

---
lib/thirdpartylibs.xml | 6 ++++++
1 file changed, 6 insertions(+)

diff --git a/lib/thirdpartylibs.xml b/lib/thirdpartylibs.xml
index 6440a73..3385d2f 100644
--- a/lib/thirdpartylibs.xml
+++ b/lib/thirdpartylibs.xml
@@ -275,4 +275,10 @@
<license>GPL</license>
<version>2.3.0</version>
</library>
+ <library>
+ <location>integrationtest</location>
+ <name>Moodle Integration test for MDLSITE-4678</name>
+ <license>GPL</license>
+ <version>2.3.0</version>
+ </library>
</libraries>
--
2.9.0

20 changes: 20 additions & 0 deletions tests/grunt_process.bats
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,23 @@ setup () {
assert_output --partial "ERROR: Some modules are not properly processed by grunt. Changes detected:"
assert_output --regexp "GRUNT-CHANGE: (.*)/lib/amd/build/url.min.js"
}

@test "grunt_process: Uncommited ignorefiles change" {
# When a third party library is added, developers need to commit
# ignorefiles change since 3.2.

# Testing on in-dev 3.2dev
create_git_branch 32-dev 5a1728df39116fc701cc907e85a638aa7674f416
cd $gitdir
$gitcmd am $BATS_TEST_DIRNAME/fixtures/32-thirdparty-lib-added.patch

# Run test
cd $BATS_TEST_DIRNAME/../grunt_process/
run ./grunt_process.sh

# Assert result
assert_failure
assert_output --partial "ERROR: Some modules are not properly processed by grunt. Changes detected:"
assert_output --regexp "GRUNT-CHANGE: (.*)/.eslintignore"
}

0 comments on commit 9ff9e98

Please sign in to comment.