@@ -62,6 +62,7 @@ describe('CommitDetailView', function() {
6262 const commit = commitBuilder ( )
6363 . sha ( '420' )
646465+ . authorName ( 'Forthe Win' )
6566 . authorDate ( moment ( ) . subtract ( 2 , 'days' ) . unix ( ) )
6667 . messageSubject ( 'subject' )
6768 . messageBody ( 'body' )
@@ -71,9 +72,9 @@ describe('CommitDetailView', function() {
7172
7273 assert . strictEqual ( wrapper . find ( '.github-CommitDetailView-title' ) . text ( ) , 'subject' ) ;
7374 assert . strictEqual ( wrapper . find ( '.github-CommitDetailView-moreText' ) . text ( ) , 'body' ) ;
74- assert . strictEqual ( wrapper . find ( '.github-CommitDetailView-metaText' ) . text ( ) , '[email protected] committed 2 days ago' ) ; 75+ assert . strictEqual ( wrapper . find ( '.github-CommitDetailView-metaText' ) . text ( ) , 'Forthe Win committed 2 days ago' ) ;
7576 assert . strictEqual ( wrapper . find ( '.github-CommitDetailView-sha' ) . text ( ) , '420' ) ;
76- // assert.strictEqual(wrapper.find('.github-CommitDetailView-sha a').prop('href'), '420');
77+ assert . strictEqual ( wrapper . find ( '.github-CommitDetailView-sha a' ) . prop ( 'href' ) , 'https://github.com/atom/github/commit/ 420' ) ;
7778 assert . strictEqual (
7879 wrapper . find ( 'img.github-RecentCommit-avatar' ) . prop ( 'src' ) ,
7980 'https://avatars.githubusercontent.com/u/e?email=very%40nice.com&s=32' ,
@@ -160,33 +161,34 @@ describe('CommitDetailView', function() {
160161 describe ( 'when there are no co-authors' , function ( ) {
161162 it ( 'returns only the author' , function ( ) {
162163 const commit = commitBuilder ( )
163- 164+ . authorName ( 'Steven Universe' )
165+ 164166 . build ( ) ;
165167 const wrapper = shallow ( buildApp ( { commit} ) ) ;
166- assert . strictEqual ( wrapper . instance ( ) . getAuthorInfo ( ) , '[email protected] ' ) ; 168+ assert . strictEqual ( wrapper . instance ( ) . getAuthorInfo ( ) , 'Steven Universe ' ) ;
167169 } ) ;
168170 } ) ;
169171
170172 describe ( 'when there is one co-author' , function ( ) {
171173 it ( 'returns author and the co-author' , function ( ) {
172174 const commit = commitBuilder ( )
173- 174- . addCoAuthor ( 'two ' , '[email protected] ' ) 175+ . authorName ( 'Ruby ')
176+ . addCoAuthor ( 'Sapphire ' , '[email protected] ' ) 175177 . build ( ) ;
176178 const wrapper = shallow ( buildApp ( { commit} ) ) ;
177- assert . strictEqual ( wrapper . instance ( ) . getAuthorInfo ( ) , '[email protected] and [email protected] ' ) ; 179+ assert . strictEqual ( wrapper . instance ( ) . getAuthorInfo ( ) , 'Ruby and Sapphire ' ) ;
178180 } ) ;
179181 } ) ;
180182
181183 describe ( 'when there is more than one co-author' , function ( ) {
182184 it ( 'returns the author and number of co-authors' , function ( ) {
183185 const commit = commitBuilder ( )
184- 185- . addCoAuthor ( 'two ' , '[email protected] ' ) 186- . addCoAuthor ( 'three ' , '[email protected] ' ) 186+ . authorName ( 'Amethyst ')
187+ . addCoAuthor ( 'Peridot ' , '[email protected] ' ) 188+ . addCoAuthor ( 'Pearl ' , '[email protected] ' ) 187189 . build ( ) ;
188190 const wrapper = shallow ( buildApp ( { commit} ) ) ;
189- assert . strictEqual ( wrapper . instance ( ) . getAuthorInfo ( ) , '[email protected] and 2 others' ) ; 191+ assert . strictEqual ( wrapper . instance ( ) . getAuthorInfo ( ) , 'Amethyst and 2 others' ) ;
190192 } ) ;
191193 } ) ;
192194 } ) ;
0 commit comments