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

stabilize flickering spec

ulfertsfc72318d21c8
diff --git a/spec/lib/api/v3/capabilities/capability_sql_representer_rendering_spec.rb b/spec/lib/api/v3/capabilities/capability_sql_representer_rendering_spec.rb
index 7901a344a20..26041fdf34d 100644
--- a/spec/lib/api/v3/capabilities/capability_sql_representer_rendering_spec.rb
+++ b/spec/lib/api/v3/capabilities/capability_sql_representer_rendering_spec.rb
@@ -35,6 +35,7 @@ describe ::API::V3::Capabilities::CapabilitySqlRepresenter, 'rendering' do
Capability
.where(principal_id: principal.id,
context_id: context&.id)
+ .order(:action)
.limit(1)
end
let(:principal) do
@@ -135,7 +136,7 @@ describe ::API::V3::Capabilities::CapabilitySqlRepresenter, 'rendering' do
it 'renders as expected' do
expect(json)
.to be_json_eql({
- "id": "users/update/g-#{principal.id}",
+ "id": "users/create/g-#{principal.id}",
"_type": "Capability",
"_links": {
"context": {
@@ -147,10 +148,10 @@ describe ::API::V3::Capabilities::CapabilitySqlRepresenter, 'rendering' do
"title": principal.name
},
"action": {
- "href": api_v3_paths.action("users/update")
+ "href": api_v3_paths.action("users/create")
},
"self": {
- "href": api_v3_paths.capability("users/update/g-#{principal.id}")
+ "href": api_v3_paths.capability("users/create/g-#{principal.id}")
}
}
}.to_json)