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

Commit

Permalink
Cover that last line in FilePatchMetaView
Browse files Browse the repository at this point in the history
  • Loading branch information
smashwilson committed Dec 3, 2018
1 parent 2012434 commit 8a27e4d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/views/file-patch-meta-view.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React from 'react';
import {shallow} from 'enzyme';

import FilePatchMetaView from '../../lib/views/file-patch-meta-view';
import CommitDetailItem from '../../lib/items/commit-detail-item';

describe('FilePatchMetaView', function() {
let atomEnv;
Expand Down Expand Up @@ -50,4 +51,10 @@ describe('FilePatchMetaView', function() {
const wrapper = shallow(buildApp({}, <div className="child" />));
assert.isTrue(wrapper.find('.github-FilePatchView-metaDetails .child').exists());
});

it('omits controls when rendered in a CommitDetailItem', function() {
const wrapper = shallow(buildApp({itemType: CommitDetailItem}));
assert.isTrue(wrapper.find('.github-FilePatchView-metaDetails').exists());
assert.isFalse(wrapper.find('.github-FilePatchView-metaControls').exists());
});
});

0 comments on commit 8a27e4d

Please sign in to comment.