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

adapt enumeration feature spec

ulfertsf75e85ad36f8
diff --git a/app/views/enumerations/index.html.erb b/app/views/enumerations/index.html.erb
index 09b495271e5..866874a56f7 100644
--- a/app/views/enumerations/index.html.erb
+++ b/app/views/enumerations/index.html.erb
@@ -29,6 +29,6 @@ See docs/COPYRIGHT.rdoc for more details.
<% html_title t(:label_administration), t(:label_enumerations) %>
<%= toolbar title: t(:label_enumerations) %>
<% Enumeration.subclasses.each do |klass| %>
- <h3 class="-no-border"><%= l(klass::OptionName) %></h3>
+ <h3 class="-no-border"><%= t(klass::OptionName) %></h3>
<%= cell ::Enumerations::TableCell, klass.shared %>
<% end %>
diff --git a/spec/features/admin/enumerations_spec.rb b/spec/features/admin/enumerations_spec.rb
index b244e58f649..3ed1dae3685 100644
--- a/spec/features/admin/enumerations_spec.rb
+++ b/spec/features/admin/enumerations_spec.rb
@@ -29,7 +29,7 @@
require 'spec_helper'
describe 'Enumerations', type: :feature do
- let(:admin) { FactoryBot.create(:admin) }
+ let(:admin) { FactoryBot.create(:admin) }
before do
login_as(admin)
@@ -37,7 +37,7 @@ describe 'Enumerations', type: :feature do
end
it 'contains all defined enumerations' do
- Enumeration.descendants.each do |enumeration|
+ Enumeration.subclasses.each do |enumeration|
expect(page).to have_selector('h3', text: I18n.t(enumeration::OptionName))
expect(page).to have_link(I18n.t(:label_enumeration_new),
href: new_enumeration_path(type: enumeration.name))