Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

use favorited_by? instead of favored_by?

Ivan Kuchin7170315c468d
diff --git a/spec/requests/api/v3/projects/favorite_resource_spec.rb b/spec/requests/api/v3/projects/favorite_resource_spec.rb
index c21c7d667db..707032e595f 100644
--- a/spec/requests/api/v3/projects/favorite_resource_spec.rb
+++ b/spec/requests/api/v3/projects/favorite_resource_spec.rb
@@ -50,7 +50,7 @@ RSpec.describe "API v3 Project favorite resource", content_type: :json do
it "responds with 204 No Content and marks as favorite", :aggregate_failures do
expect(last_response).to have_http_status(204)
- expect(project.favored_by?(user)).to be true
+ expect(project.favorited_by?(user)).to be true
end
context "when project is already favorited" do
@@ -61,7 +61,7 @@ RSpec.describe "API v3 Project favorite resource", content_type: :json do
it "responds with 204 No Content and keeps project as is", :aggregate_failures do
expect(last_response).to have_http_status(204)
- expect(project.favored_by?(user)).to be true
+ expect(project.favorited_by?(user)).to be true
end
end
@@ -111,7 +111,7 @@ RSpec.describe "API v3 Project favorite resource", content_type: :json do
it "responds with 204 No Content and removes favorite", :aggregate_failures do
expect(last_response).to have_http_status(204)
- expect(project.favored_by?(user)).to be false
+ expect(project.favorited_by?(user)).to be false
end
context "when project is not favorited" do
@@ -122,7 +122,7 @@ RSpec.describe "API v3 Project favorite resource", content_type: :json do
it "responds with 204 No Content, and keeps the project as is", :aggregate_failures do
expect(last_response).to have_http_status(204)
- expect(project.favored_by?(user)).to be false
+ expect(project.favorited_by?(user)).to be false
end
end