Fix activity spec

This commit is contained in:
Ivan Meredith 2016-08-08 16:34:53 +12:00
parent 8cdc066ff9
commit 2c203185a0
1 changed files with 15 additions and 6 deletions

View File

@ -129,10 +129,19 @@ const
}
];
const pipeline = {
_class: "some.class"
}
const capabilities = {
'some.class':{
has: () => true
}
}
describe("Activity should render", () => {
it("does renders the Activity with data", () => {
const wrapper = shallow(<Activity runs={data} />);
const wrapper = shallow(<Activity runs={data} pipeline={pipeline} capabilities={capabilities}/>);
// does data renders?
assert.isNotNull(wrapper)
assert.equal(wrapper.find('Runs').length, data.length)
@ -142,14 +151,14 @@ describe("Activity should render", () => {
describe("Activity should not render", () => {
it("does not renders the Activity without data", () => {
const wrapper = shallow(<Activity />).node;
const wrapper = shallow(<Activity pipeline={pipeline} capabilities={capabilities}/>).node;
assert.isNull(wrapper);
});
});
describe('Pipeline -> Activity List', () => {
it('should not duplicate changeset messages', () => {
const wrapper = shallow(<Activity runs={data} />);
const wrapper = shallow(<Activity runs={data} pipeline={pipeline} capabilities={capabilities} />);
assert.isNotNull(wrapper);
const runs = wrapper.find('Runs');