Skip to content

Commit

Permalink
using create instead of build->save->reload
Browse files Browse the repository at this point in the history
  • Loading branch information
Lane Erickson committed Aug 23, 2018
1 parent 5e09e16 commit de2b47a
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions spec/app/models/link_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,8 @@
end

it "replaces underscores with dashes" do
link = FactoryGirl.build(:link, alias: "foo_bar")
link.save!
link.reload
expect(link.alias).to eq "foo-bar"
expect(
FactoryGirl.create(:link, alias: "foo_bar").alias
).to eq "foo-bar"
end
end

0 comments on commit de2b47a

Please sign in to comment.