Add displaying no_milestones text on admin

This commit is contained in:
taitus
2017-06-26 13:08:28 +02:00
parent e0d11d6b2a
commit 64ff75c384
5 changed files with 18 additions and 0 deletions

5
app/models/interest.rb Normal file
View File

@@ -0,0 +1,5 @@
class Interest < ActiveRecord::Base
belongs_to :user
belongs_to :interestable, polymorphic: true
end

View File

@@ -29,4 +29,8 @@
<% end %>
</tbody>
</table>
<% else %>
<p>
<%= t('admin.milestones.index.no_milestones') %>
</p>
<% end %>

View File

@@ -169,6 +169,7 @@ en:
table_description: "Description"
table_actions: "Actions"
delete: "Delete milestone"
no_milestones: "Don't have defined milestones"
new:
creating: Create milestone
edit:

View File

@@ -169,6 +169,7 @@ es:
table_description: "Descripción"
table_actions: "Acciones"
delete: "Eliminar hito"
no_milestones: "No hay hitos definidos"
new:
creating: Crear hito
edit:

View File

@@ -19,6 +19,13 @@ feature 'Admin budget investment milestones' do
expect(page).to have_content(milestone.title)
expect(page).to have_content(milestone.id)
end
scenario 'Displaying no_milestones text' do
visit admin_budget_budget_investment_path(@investment.budget, @investment)
expect(page).to have_content("Milestone")
expect(page).to have_content("Don't have defined milestones")
end
end
context "New" do