Skip to content

Commit

Permalink
Fixed tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
IanCStewart committed Aug 10, 2017
1 parent c57984d commit af68fb1
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 3 deletions.
22 changes: 21 additions & 1 deletion test/profile/get-styles.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,35 @@ describe('Profile.getStyles', () => {
});
});

describe('cover', () => {
it('should get styles', () => {
const style = getStyles.cover();

expect(style).to.deep.equal(styles.cover);
});

it('should combine styles', () => {
const style = getStyles.cover({ color: 'red' });

expect(style).to.have.property('color', 'red');
});
});

describe('coverImage', () => {
it('should get styles', () => {
const style = getStyles.coverImage();

expect(style).to.deep.equal(styles.coverImage);
});

it('should add image styles', () => {
const style = getStyles.coverImage({ backgroundImage: 'url(https://avatars1.githubusercontent.com/u/6596471?v=3&s=400)' });

expect(style).to.have.property('backgroundImage', 'url(https://avatars1.githubusercontent.com/u/6596471?v=3&s=400)');
});

it('should combine styles', () => {
const style = getStyles.coverImage({ color: 'red' });
const style = getStyles.coverImage({}, { color: 'red' });

expect(style).to.have.property('color', 'red');
});
Expand Down
4 changes: 2 additions & 2 deletions test/profile/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ describe('Profile', () => {
global.navigator = undefined;
});

it('should always render four section elements', () => {
it('should always render three section elements', () => {
const wrapper = shallow(<Profile {...props} />);

expect(wrapper.find('section')).to.have.length(4);
expect(wrapper.find('section')).to.have.length(3);
});

it('should always render a h1 element', () => {
Expand Down

0 comments on commit af68fb1

Please sign in to comment.