Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Commit 200a9e6

Browse files
committed
Rename shadowing variable
1 parent cc41994 commit 200a9e6

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

test/controllers/github-tab-controller.test.js

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -105,28 +105,29 @@ describe('GitHubTabController', function() {
105105

106106
describe('actions', function() {
107107
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}));
111111

112112
const branch = new Branch('abc');
113113
const remote = new Remote('def', '[email protected]:def/ghi.git');
114114
assert.isTrue(await wrapper.find('GitHubTabView').prop('handlePushBranch')(branch, remote));
115115

116-
assert.isTrue(repository.push.calledWith('abc', {remote, setUpstream: true}));
116+
assert.isTrue(absent.push.calledWith('abc', {remote, setUpstream: true}));
117117
});
118118

119119
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}));
123123

124124
const remote = new Remote('aaa', '[email protected]:aaa/aaa.git');
125125
const event = {preventDefault: sinon.spy()};
126126
assert.isTrue(await wrapper.find('GitHubTabView').prop('handleRemoteSelect')(event, remote));
127127

128128
assert.isTrue(event.preventDefault.called);
129-
assert.isTrue(repository.setConfig.calledWith('atomGithub.currentRemote', 'aaa'));
129+
assert.isTrue(absent.setConfig.calledWith('atomGithub.currentRemote', 'aaa'));
130+
});
130131

131132
it('opens the publish dialog on the active repository', async function() {
132133
const someRepo = await buildRepository(await cloneRepository());

0 commit comments

Comments
 (0)