mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-30 19:48:18 +08:00
Fix failing tests [SCI-3412]
This commit is contained in:
parent
5a9640c5d1
commit
0fd7a4e8f1
2 changed files with 5 additions and 14 deletions
|
@ -247,7 +247,7 @@ describe RepositoryTableStateColumnUpdateService do
|
|||
|
||||
it 'should keep columns as they were' do
|
||||
cols_1 = initial_state_1.state['columns'].deep_dup
|
||||
cols_1['3']['visible'] = 'false'
|
||||
cols_1['4']['visible'] = 'false'
|
||||
RepositoryTableStateService.new(user_1, repository).update_state(
|
||||
initial_state_1.state.merge('columns' => cols_1)
|
||||
)
|
||||
|
@ -367,4 +367,4 @@ describe RepositoryTableStateColumnUpdateService do
|
|||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -36,11 +36,7 @@ describe RepositoryTableStateService do
|
|||
|
||||
describe '#create_default_state' do
|
||||
let!(:initial_state) do
|
||||
RepositoryTableState.create(
|
||||
user: user,
|
||||
repository: repository,
|
||||
state: {}
|
||||
)
|
||||
RepositoryTableStateService.new(user, repository).create_default_state
|
||||
end
|
||||
|
||||
context('record counts') do
|
||||
|
@ -75,12 +71,7 @@ describe RepositoryTableStateService do
|
|||
|
||||
describe '#load_state' do
|
||||
it 'should load initial state if it exists' do
|
||||
initial_state = RepositoryTableState.create(
|
||||
user: user,
|
||||
repository: repository,
|
||||
state: {}
|
||||
)
|
||||
|
||||
initial_state = RepositoryTableStateService.new(user, repository).create_default_state
|
||||
record = service.load_state
|
||||
expect(record).to eq initial_state
|
||||
end
|
||||
|
@ -108,4 +99,4 @@ describe RepositoryTableStateService do
|
|||
expect(record.state).to eq new_state
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue