mirror of
https://github.com/opf/openproject.git
synced 2026-06-13 19:20:00 +00:00
Fix link
This commit is contained in:
@@ -47,7 +47,7 @@ See COPYRIGHT and LICENSE files for more details.
|
||||
mobile_icon: :pencil,
|
||||
mobile_label: t(:button_edit),
|
||||
size: :medium,
|
||||
href: edit_project_news_path(@news),
|
||||
href: edit_project_news_path(@project, @news),
|
||||
aria: { label: I18n.t(:button_edit) },
|
||||
title: I18n.t(:button_edit)
|
||||
) do |button|
|
||||
|
||||
@@ -103,6 +103,12 @@ RSpec.describe NewsController do
|
||||
|
||||
expect(response).to be_not_found
|
||||
end
|
||||
|
||||
it "renders edit link with correct project identifier" do
|
||||
get :show, params: { project_id: news.project_id, id: news.id }
|
||||
|
||||
expect(response.body).to include edit_project_news_path(project, news)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user