Skip to content

Commit

Permalink
Fix one more random failure
Browse files Browse the repository at this point in the history
  • Loading branch information
mshibuya committed Apr 14, 2014
1 parent afbc98b commit bef6f02
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
fill_in 'player[name]', with: 'Jackie Robinson'
fill_in 'player[number]', with: '42'
fill_in 'player[position]', with: 'Second baseman'
click_button 'Save' # first(:button, "Save").click
click_button 'Save'
@player = RailsAdmin::AbstractModel.new('Player').first
end

Expand Down Expand Up @@ -64,7 +64,7 @@

post new_path(model_name: 'player', player: {name: 'Jackie Robinson', number: 42, position: 'Second baseman', draft_id: @draft.id})

@player = RailsAdmin::AbstractModel.new('Player').all.to_a.last # first is created by FactoryGirl
@player = RailsAdmin::AbstractModel.new('Player').all.to_a.detect { |player| player.name == 'Jackie Robinson' }
end

it 'creates an object with correct associations' do
Expand Down

0 comments on commit bef6f02

Please sign in to comment.