Fix syntax and indentation errors.
This commit is contained in:
@@ -10,12 +10,12 @@
|
||||
<% end %>
|
||||
</li>
|
||||
<li class="tabs-title">
|
||||
<%= link_to "#tab-milestones" do %>
|
||||
<h3>
|
||||
<%= t("budgets.investments.show.milestones_tab") %>
|
||||
(<%= @investment.milestones.count %>)
|
||||
</h3>
|
||||
<% end %>
|
||||
<%= link_to "#tab-milestones" do %>
|
||||
<h3>
|
||||
<%= t("budgets.investments.show.milestones_tab") %>
|
||||
(<%= @investment.milestones.count %>)
|
||||
</h3>
|
||||
<% end %>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -324,7 +324,7 @@ FactoryGirl.define do
|
||||
|
||||
factory :budget_investment_milestone, class: 'Budget::Investment::Milestone' do
|
||||
association :investment, factory: :budget_investment
|
||||
sequence(:title) { |n| "Budget Investment Milestone #{n} title" }
|
||||
sequence(:title) { |n| "Budget investment milestone #{n} title" }
|
||||
description 'Milestone description'
|
||||
end
|
||||
|
||||
|
||||
@@ -391,11 +391,10 @@ feature 'Budget Investments' do
|
||||
|
||||
scenario "Show milestones", :js do
|
||||
user = create(:user)
|
||||
login_as(user)
|
||||
|
||||
investment = create(:budget_investment)
|
||||
milestone = create(:budget_investment_milestone, investment: investment, title: "New text to show")
|
||||
|
||||
login_as(user)
|
||||
visit budget_investment_path(budget_id: investment.budget.id, id: investment.id)
|
||||
|
||||
find("#tab-milestones-label").trigger('click')
|
||||
@@ -408,10 +407,9 @@ feature 'Budget Investments' do
|
||||
|
||||
scenario "Show no_milestones text", :js do
|
||||
user = create(:user)
|
||||
login_as(user)
|
||||
|
||||
investment = create(:budget_investment)
|
||||
|
||||
login_as(user)
|
||||
visit budget_investment_path(budget_id: investment.budget.id, id: investment.id)
|
||||
|
||||
find("#tab-milestones-label").trigger('click')
|
||||
|
||||
@@ -5,16 +5,16 @@ describe "Budget::Investment::Milestone" do
|
||||
describe "Validations" do
|
||||
let(:milestone) { build(:budget_investment_milestone) }
|
||||
|
||||
it "should be valid" do
|
||||
it "Should be valid" do
|
||||
expect(milestone).to be_valid
|
||||
end
|
||||
|
||||
it "should not be valid without a title" do
|
||||
it "Should not be valid without a title" do
|
||||
milestone.title = nil
|
||||
expect(milestone).to_not be_valid
|
||||
end
|
||||
|
||||
it "should not be valid without an investment" do
|
||||
it "Should not be valid without an investment" do
|
||||
milestone.investment_id = nil
|
||||
expect(milestone).to_not be_valid
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user