Created
March 9, 2014 20:30
-
-
Save pbedat/9454121 to your computer and use it in GitHub Desktop.
GetTestcasesAvailableToCycle
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| angular.module("xAmine").factory("GetTestcasesAvailableToCycle", function(GetTestcasesByProject){ | |
| var filterTestcasesIn = function(cycle){ | |
| return function(testcases){ | |
| var testCasesInCycle = _.chain(cycle.Tests.Items).pluck("Testcase").pluck("Id").value(); | |
| return _(testcases).reject(function(testcase){ | |
| return _(testCasesInCycle).contains(testcase.Id); | |
| }); | |
| }; | |
| }; | |
| return function(cycle){ | |
| return GetTestcasesByProject(cycle.ProjectId).then(filterTestcasesIn(cycle)); | |
| }; | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment