Skip to content

Commit

Permalink
Rename Adviser.most_recently_edited to Adviser.most_recently_updated
Browse files Browse the repository at this point in the history
  • Loading branch information
Caden Lovelace committed Jun 19, 2015
1 parent 38c5630 commit 57ea1f8
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 16 deletions.
4 changes: 3 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ gem 'dough-ruby',
gem 'jquery-rails'
gem 'kaminari'
gem 'letter_opener', group: :development
gem 'mas-rad_core', '0.0.57'
gem 'mas-rad_core',
github: 'moneyadviceservice/mas-rad_core',
branch: 'refactor/rename_edited_to_updated'
gem 'oga'
gem 'pg'
gem 'ransack'
Expand Down
28 changes: 17 additions & 11 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,21 @@ GIT
rails (>= 3.2)
sass-rails (~> 4.0.0)

GIT
remote: git://github.com/moneyadviceservice/mas-rad_core.git
revision: 5d40128d931d1a7933a10c16995e7ae9cda685f8
branch: refactor/rename_edited_to_updated
specs:
mas-rad_core (0.0.57)
active_model_serializers
geocoder
httpclient
pg
rails (~> 4.2)
redis
statsd-ruby
uk_phone_numbers

GEM
remote: https://rubygems.org/
specs:
Expand Down Expand Up @@ -128,15 +143,6 @@ GEM
nokogiri (>= 1.5.9)
mail (2.6.3)
mime-types (>= 1.16, < 3)
mas-rad_core (0.0.57)
active_model_serializers
geocoder
httpclient
pg
rails (~> 4.2)
redis
statsd-ruby
uk_phone_numbers
method_source (0.8.2)
mime-types (2.5)
mini_portile (0.6.2)
Expand Down Expand Up @@ -313,7 +319,7 @@ DEPENDENCIES
kaminari
launchy
letter_opener
mas-rad_core (= 0.0.57)
mas-rad_core!
oga
pg
poltergeist
Expand All @@ -334,4 +340,4 @@ DEPENDENCIES
unicorn

BUNDLED WITH
1.10.3
1.10.4
2 changes: 1 addition & 1 deletion app/views/dashboard/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<div class="l-3col-even">
<h2><%= t('dashboard.advisers_heading') %> (<span class="t-adviser-count"><%= @advisers.size %></span>)</h2>
<ul class="dashboard-list">
<%= render partial: 'dashboard/advisers/adviser', collection: @advisers.most_recently_edited %>
<%= render partial: 'dashboard/advisers/adviser', collection: @advisers.most_recently_updated %>
</ul>

<div class="dashboard__action-button">
Expand Down
6 changes: 3 additions & 3 deletions spec/features/dashboard/dashboard_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
and_i_have_a_firm_with_trading_names
and_i_am_logged_in
when_i_am_on_the_principal_dashboard
then_i_can_see_the_list_of_most_recently_edited_advisers
then_i_can_see_the_list_of_most_recently_updated_advisers
then_i_can_see_the_total_number_of_advisers
end

Expand Down Expand Up @@ -62,8 +62,8 @@ def and_the_trading_names_are_present_and_labelled_trading_names
end
end

def then_i_can_see_the_list_of_most_recently_edited_advisers
advisers = Adviser.on_firms_with_fca_number(@principal.firm.fca_number).most_recently_edited
def then_i_can_see_the_list_of_most_recently_updated_advisers
advisers = Adviser.on_firms_with_fca_number(@principal.firm.fca_number).most_recently_updated

dashboard_page.advisers.each.with_index do |adviser, idx|
expect(adviser).to have_name(text: advisers[idx].name)
Expand Down

0 comments on commit 57ea1f8

Please sign in to comment.