Skip to content

Commit

Permalink
Change references to FactoryBot
Browse files Browse the repository at this point in the history
  • Loading branch information
etagwerker committed Oct 28, 2019
1 parent ecfe44c commit 494743d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions test/controllers/advisories_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

class AdvisoriesControllerTest < ActionDispatch::IntegrationTest
test "should get index" do
FactoryGirl.create_list(:rubymem_advisory, 5)
FactoryBot.create_list(:rubymem_advisory, 5)
get advisories_path
assert_response :success
end

test "should get show" do
advisory = FactoryGirl.create(:rubymem_advisory)
advisory = FactoryBot.create(:rubymem_advisory)
get advisory_path(advisory)
assert_response :success
end
Expand Down
2 changes: 1 addition & 1 deletion test/controllers/home_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class HomeControllerTest < ActionDispatch::IntegrationTest
end

test "should get atom feed" do
FactoryGirl.create_list(:rubymem_advisory, 5, imported: true)
FactoryBot.create_list(:rubymem_advisory, 5, imported: true)
get feed_path
assert_response :success
end
Expand Down
4 changes: 2 additions & 2 deletions test/factories/rubysec_advisories.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FactoryGirl.define do
FactoryBot.define do
sequence :gem do |n|
"gem_number#{n}"
end
Expand All @@ -7,7 +7,7 @@
identifier { gem }
gem
date { rand(1..99).weeks.ago }
title "this is a title"
title { "this is a title" }
patched_versions { ["> 1.2.3", "~> 3.2"] }
unaffected_versions { [">= 1.2.4", "~> 2.2"] }
updated_at { rand(1..99).weeks.ago }
Expand Down

0 comments on commit 494743d

Please sign in to comment.