Skip to content

Commit

Permalink
Increase coverage with directive tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
kaladay committed Oct 1, 2020
1 parent 3a75c4e commit 6ded475
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion tests/unit/directives/remoteProjectsIconDirective.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ describe("directive: remoteProjectsIcon", function () {
inject(function (_$rootScope_) {
$scope = _$rootScope_.$new();

var attr = settings && settings.attr ? settings.attr : "type=\"GITHUB_MILESTONE\"";
var attr = settings && settings.attr ? settings.attr : "";
var body = settings && settings.body ? settings.body : "";

element = angular.element("<remote-projects-icon " + attr + ">" + body + "</remote-projects-icon>");
Expand All @@ -36,5 +36,20 @@ describe("directive: remoteProjectsIcon", function () {
initializeDirective();
expect(directive).toBeDefined();
});

it("defined using GITHUB_MILESTONE", function () {
initializeDirective({attr: "type=\"GITHUB_MILESTONE\""});
expect(directive).toBeDefined();
});

it("defined using GITHUB_PROJECT", function () {
initializeDirective({attr: "type=\"GITHUB_PROJECT\""});
expect(directive).toBeDefined();
});

it("defined using VERSION_ONE", function () {
initializeDirective({attr: "type=\"VERSION_ONE\""});
expect(directive).toBeDefined();
});
});
});

0 comments on commit 6ded475

Please sign in to comment.