@@ -105,28 +105,29 @@ describe('GitHubTabController', function() {
105
105
106
106
describe ( 'actions' , function ( ) {
107
107
it ( 'pushes a branch' , async function ( ) {
108
- const repository = Repository . absent ( ) ;
109
- sinon . stub ( repository , 'push' ) . resolves ( true ) ;
110
- const wrapper = shallow ( buildApp ( { repository} ) ) ;
108
+ const absent = Repository . absent ( ) ;
109
+ sinon . stub ( absent , 'push' ) . resolves ( true ) ;
110
+ const wrapper = shallow ( buildApp ( { repository : absent } ) ) ;
111
111
112
112
const branch = new Branch ( 'abc' ) ;
113
113
const remote = new Remote ( 'def' , '[email protected] :def/ghi.git' ) ;
114
114
assert . isTrue ( await wrapper . find ( 'GitHubTabView' ) . prop ( 'handlePushBranch' ) ( branch , remote ) ) ;
115
115
116
- assert . isTrue ( repository . push . calledWith ( 'abc' , { remote, setUpstream : true } ) ) ;
116
+ assert . isTrue ( absent . push . calledWith ( 'abc' , { remote, setUpstream : true } ) ) ;
117
117
} ) ;
118
118
119
119
it ( 'chooses a remote' , async function ( ) {
120
- const repository = Repository . absent ( ) ;
121
- sinon . stub ( repository , 'setConfig' ) . resolves ( true ) ;
122
- const wrapper = shallow ( buildApp ( { repository} ) ) ;
120
+ const absent = Repository . absent ( ) ;
121
+ sinon . stub ( absent , 'setConfig' ) . resolves ( true ) ;
122
+ const wrapper = shallow ( buildApp ( { repository : absent } ) ) ;
123
123
124
124
const remote = new Remote ( 'aaa' , '[email protected] :aaa/aaa.git' ) ;
125
125
const event = { preventDefault : sinon . spy ( ) } ;
126
126
assert . isTrue ( await wrapper . find ( 'GitHubTabView' ) . prop ( 'handleRemoteSelect' ) ( event , remote ) ) ;
127
127
128
128
assert . isTrue ( event . preventDefault . called ) ;
129
- assert . isTrue ( repository . setConfig . calledWith ( 'atomGithub.currentRemote' , 'aaa' ) ) ;
129
+ assert . isTrue ( absent . setConfig . calledWith ( 'atomGithub.currentRemote' , 'aaa' ) ) ;
130
+ } ) ;
130
131
131
132
it ( 'opens the publish dialog on the active repository' , async function ( ) {
132
133
const someRepo = await buildRepository ( await cloneRepository ( ) ) ;
0 commit comments