diff options
author | Douwe Maan <douwe@gitlab.com> | 2019-03-15 13:30:57 +0300 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2019-03-15 13:30:57 +0300 |
commit | 7fa987436bab5fe9a9c3581efa74b23f41bf53c8 (patch) | |
tree | e571fc3c5e62a86db3832b44dfbe13b785573898 /spec/controllers | |
parent | 7b5cf9e878af13e95dc23e9827ec3322fc4c134b (diff) | |
parent | 6e3bb1e3888fa7db1afd4e9ff2239106c49d0e38 (diff) |
Merge branch 'refactor-boards-actions' into 'master'
Refactor groups and projects boards actions
See merge request gitlab-org/gitlab-ce!25568
Diffstat (limited to 'spec/controllers')
-rw-r--r-- | spec/controllers/groups/boards_controller_spec.rb | 22 | ||||
-rw-r--r-- | spec/controllers/projects/boards_controller_spec.rb | 22 |
2 files changed, 0 insertions, 44 deletions
diff --git a/spec/controllers/groups/boards_controller_spec.rb b/spec/controllers/groups/boards_controller_spec.rb index 4228e727b52..27ee37b3817 100644 --- a/spec/controllers/groups/boards_controller_spec.rb +++ b/spec/controllers/groups/boards_controller_spec.rb @@ -22,28 +22,6 @@ describe Groups::BoardsController do expect(response.content_type).to eq 'text/html' end - it 'redirects to latest visited board' do - board = create(:board, group: group) - create(:board_group_recent_visit, group: board.group, board: board, user: user) - - list_boards - - expect(response).to redirect_to(group_board_path(id: board.id)) - end - - it 'renders template if visited board is not found' do - temporary_board = create(:board, group: group) - visited = create(:board_group_recent_visit, group: temporary_board.group, board: temporary_board, user: user) - temporary_board.delete - - allow_any_instance_of(Boards::Visits::LatestService).to receive(:execute).and_return(visited) - - list_boards - - expect(response).to render_template :index - expect(response.content_type).to eq 'text/html' - end - context 'with unauthorized user' do before do allow(Ability).to receive(:allowed?).with(user, :read_cross_project, :global).and_return(true) diff --git a/spec/controllers/projects/boards_controller_spec.rb b/spec/controllers/projects/boards_controller_spec.rb index 09199067024..1eeded06459 100644 --- a/spec/controllers/projects/boards_controller_spec.rb +++ b/spec/controllers/projects/boards_controller_spec.rb @@ -28,28 +28,6 @@ describe Projects::BoardsController do expect(response.content_type).to eq 'text/html' end - it 'redirects to latest visited board' do - board = create(:board, project: project) - create(:board_project_recent_visit, project: board.project, board: board, user: user) - - list_boards - - expect(response).to redirect_to(namespace_project_board_path(id: board.id)) - end - - it 'renders template if visited board is not found' do - temporary_board = create(:board, project: project) - visited = create(:board_project_recent_visit, project: temporary_board.project, board: temporary_board, user: user) - temporary_board.delete - - allow_any_instance_of(Boards::Visits::LatestService).to receive(:execute).and_return(visited) - - list_boards - - expect(response).to render_template :index - expect(response.content_type).to eq 'text/html' - end - context 'with unauthorized user' do before do allow(Ability).to receive(:allowed?).with(user, :read_project, project).and_return(true) |