Merge pull request #1293 from consul/budgets-valuation

Fixes  valuation features
This commit is contained in:
Juanjo Bazán
2016-12-13 16:18:45 +01:00
committed by GitHub
2 changed files with 5 additions and 5 deletions

View File

@@ -2,7 +2,7 @@ class Valuation::BudgetsController < Valuation::BaseController
include FeatureFlags
feature_flag :budgets
has_filters %w{open finished}, only: :index
has_filters %w{current finished}, only: :index
load_and_authorize_resource
@@ -10,4 +10,4 @@ class Valuation::BudgetsController < Valuation::BaseController
@budgets = Budget.send(@current_filter).order(created_at: :desc).page(params[:page])
end
end
end

View File

@@ -42,7 +42,7 @@ feature 'Valuation budgets' do
expect(page).to_not have_content(budget4.name)
expect(page).to have_content(budget5.name)
click_link 'Open'
click_link 'Current'
expect(page).to have_content(budget1.name)
expect(page).to have_content(budget2.name)
expect(page).to have_content(budget3.name)
@@ -51,7 +51,7 @@ feature 'Valuation budgets' do
end
scenario 'Current filter is properly highlighted' do
filters_links = {'open' => 'Open', 'finished' => 'Finished'}
filters_links = {'current' => 'Current', 'finished' => 'Finished'}
visit valuation_budgets_path
@@ -71,4 +71,4 @@ feature 'Valuation budgets' do
end
end
end