Support changing the server name by clicking it in the status tab
This commit is contained in:
parent
3b33957161
commit
b639ba6846
14 changed files with 259 additions and 56 deletions
|
@ -1,5 +1,5 @@
|
|||
import Immutable from 'immutable';
|
||||
import reducer, { connect } from '../servers';
|
||||
import reducer, { connect, setServerName } from '../servers';
|
||||
import * as actions from '../actions';
|
||||
|
||||
describe('reducers/servers', () => {
|
||||
|
@ -58,6 +58,22 @@ describe('reducers/servers', () => {
|
|||
});
|
||||
});
|
||||
|
||||
it('handles SET_SERVER_NAME', () => {
|
||||
let state = Immutable.fromJS({
|
||||
srv: {
|
||||
name: 'cake'
|
||||
}
|
||||
});
|
||||
|
||||
state = reducer(state, setServerName('pie', 'srv'));
|
||||
|
||||
expect(state.toJS()).toEqual({
|
||||
srv: {
|
||||
name: 'pie'
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
it('updates the nick on SOCKET_NICK', () => {
|
||||
let state = reducer(undefined, connect('127.0.0.1:1337', 'nick', {}));
|
||||
state = reducer(state, {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue