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

Reduce no. of assertions

Kabiru Mwenjaac672be616cf
diff --git a/spec/requests/api/v3/emoji_reactions/emoji_reactions_by_activity_comment_api_spec.rb b/spec/requests/api/v3/emoji_reactions/emoji_reactions_by_activity_comment_api_spec.rb
index 68acb7f1551..162b34c77cd 100644
--- a/spec/requests/api/v3/emoji_reactions/emoji_reactions_by_activity_comment_api_spec.rb
+++ b/spec/requests/api/v3/emoji_reactions/emoji_reactions_by_activity_comment_api_spec.rb
@@ -61,7 +61,7 @@ RSpec.describe API::V3::EmojiReactions::EmojiReactionsByActivityCommentAPI do
expect(last_response).to have_http_status :ok
end
- it "returns the emoji reactions" do # rubocop:disable RSpec/ExampleLength
+ it "returns the emoji reactions" do
expect(last_response.body)
.to be_json_eql(1.to_json)
.at_path("total")
@@ -81,22 +81,6 @@ RSpec.describe API::V3::EmojiReactions::EmojiReactionsByActivityCommentAPI do
expect(last_response.body)
.to be_json_eql(emoji_reaction.emoji.to_json)
.at_path("_embedded/elements/0/emoji")
-
- expect(last_response.body)
- .to be_json_eql(emoji_reaction.reaction.to_json)
- .at_path("_embedded/elements/0/reaction")
-
- expect(last_response.body)
- .to be_json_eql(1.to_json)
- .at_path("_embedded/elements/0/reactionsCount")
-
- expect(last_response.body)
- .to be_json_eql(api_v3_paths.emoji_reactions_by_activity_comment(activity.id).to_json)
- .at_path("_links/self/href")
-
- expect(last_response.body)
- .to be_json_eql(api_v3_paths.activity(activity.id).to_json)
- .at_path("_embedded/elements/0/_links/reactable/href")
end
end
diff --git a/spec/requests/api/v3/emoji_reactions/emoji_reactions_by_work_package_comments_api_spec.rb b/spec/requests/api/v3/emoji_reactions/emoji_reactions_by_work_package_comments_api_spec.rb
index 3c3facfe41f..c11f5bb83bd 100644
--- a/spec/requests/api/v3/emoji_reactions/emoji_reactions_by_work_package_comments_api_spec.rb
+++ b/spec/requests/api/v3/emoji_reactions/emoji_reactions_by_work_package_comments_api_spec.rb
@@ -62,7 +62,7 @@ RSpec.describe API::V3::EmojiReactions::EmojiReactionsByWorkPackageCommentsAPI d
expect(last_response).to have_http_status :ok
end
- it "returns the emoji reactions" do # rubocop:disable RSpec/ExampleLength
+ it "returns the emoji reactions" do
expect(last_response.body)
.to be_json_eql(1.to_json)
.at_path("total")
@@ -82,22 +82,6 @@ RSpec.describe API::V3::EmojiReactions::EmojiReactionsByWorkPackageCommentsAPI d
expect(last_response.body)
.to be_json_eql(emoji_reaction.emoji.to_json)
.at_path("_embedded/elements/0/emoji")
-
- expect(last_response.body)
- .to be_json_eql(emoji_reaction.reaction.to_json)
- .at_path("_embedded/elements/0/reaction")
-
- expect(last_response.body)
- .to be_json_eql(1.to_json)
- .at_path("_embedded/elements/0/reactionsCount")
-
- expect(last_response.body)
- .to be_json_eql(api_v3_paths.emoji_reactions_by_work_package_comments(work_package.id).to_json)
- .at_path("_links/self/href")
-
- expect(last_response.body)
- .to be_json_eql(api_v3_paths.activity(activity.id).to_json)
- .at_path("_embedded/elements/0/_links/reactable/href")
end
end