Project

General

Profile

« Previous | Next » 

Revision 2b81dfe4

Added by Tomer Brisker about 7 years ago

Fixes #14492 - Unify delete and minimize for dashboard widgets

Originally the idea was for the buttons to have a different effect on
the widgets, however with changes introduced later on these differences
have been reduced to being insignificant.

View differences:

test/controllers/dashboard_controller_test.rb
test "#save_positions updates each widget" do
widget = FactoryGirl.create(:widget, :user => users(:admin))
params = {
widget.id.to_s => {:hide => 'false', :col => '4', :row => '3', :sizex => '8', :sizey => '1'}
widget.id.to_s => {:col => '4', :row => '3', :sizex => '8', :sizey => '1'}
}
post :save_positions, {:widgets => params, :format => 'json'}, set_session_user
assert_response :success
widget.reload
assert_equal false, widget.hide
assert_equal 4, widget.col
assert_equal 3, widget.row
end

Also available in: Unified diff