-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Block add custom collectible when user is not the owner (#359)
* block add custom collectible when user not owner * test * handle contract errors * change locale
- Loading branch information
1 parent
617b680
commit 93731a5
Showing
3 changed files
with
57 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,25 @@ | ||
import React from 'react'; | ||
import { shallow } from 'enzyme'; | ||
import AddCustomCollectible from './'; | ||
import configureMockStore from 'redux-mock-store'; | ||
|
||
const mockStore = configureMockStore(); | ||
|
||
describe('AddCustomCollectible', () => { | ||
it('should render correctly', () => { | ||
const wrapper = shallow(<AddCustomCollectible />); | ||
expect(wrapper).toMatchSnapshot(); | ||
const initialState = { | ||
engine: { | ||
backgroundState: { | ||
PreferencesController: { | ||
selectedAddress: '0x1' | ||
} | ||
} | ||
} | ||
}; | ||
|
||
const wrapper = shallow(<AddCustomCollectible navigation={{ state: { params: {} } }} />, { | ||
context: { store: mockStore(initialState) } | ||
}); | ||
expect(wrapper.dive()).toMatchSnapshot(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters