Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Side by Side Diff: Tools/GardeningServer/model/test/ct-commit-list-tests.html

Issue 464963003: Move commit list out its own model. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 <!--
2 Copyright 2014 The Chromium Authors. All rights reserved.
3 Use of this source code is governed by a BSD-style license that can be
4 found in the LICENSE file.
5 -->
6
7 <link rel="import" href="../ct-commit-list.html">
8
9 <script>
10 (function () {
11
12 var assert = chai.assert;
13
14 describe('ct-commit-list', function() {
15 describe('commit list Model', function() {
16 it('returns commits', function() {
17 var group = {
18 failures: [
19 {
20 firstFailingRevisions: {
21 'blink': 158545
22 },
23 lastPassingRevisions: {
24 'blink': 158544
25 }
26 }
27 ]
28 };
29
30 var cl = new CTCommitList(group, new CTCommitLogMock());
31 assert.lengthOf(cl._commits('blink'), 1);
32 });
33
34 it('handles a backwards revision range', function() {
35 var group = {
36 failures: [
37 {
38 firstFailingRevisions: {
39 'blink': 158544
40 },
41 lastPassingRevisions: {
42 'blink': 158545
43 }
44 }
45 ]
46 };
47
48 var cl = new CTCommitList(group, new CTCommitLogMock());
49 assert.lengthOf(cl._commits('blink'), 0);
50 });
51
52 it ('returns repositories', function() {
53 var group = {
54 failures: [
55 {
56 firstFailingRevisions: {
57 'blink': 158545
58 },
59 lastPassingRevisions: {
60 'blink': 158544
61 }
62 }
63 ]
64 };
65
66 var cl = new CTCommitList(group, new CTCommitLogMock());
67 var repos = cl.repositories();
68 assert.lengthOf(repos, 1);
69 assert.equal(repos[0].name, 'blink');
70 assert.lengthOf(repos[0].commits, 1);
71 assert.equal(repos[0].range, '158545 : 158545')
72 });
73 });
74 });
75
76 })();
77 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698