diff --git a/spec/requests/consumer/distributors_spec.rb b/spec/requests/consumer/distributors_spec.rb index 1139ace1cd..aaaf78e618 100644 --- a/spec/requests/consumer/distributors_spec.rb +++ b/spec/requests/consumer/distributors_spec.rb @@ -10,9 +10,9 @@ feature %q{ scenario "viewing a list of distributors" do # Given some distributors - d1 = create(:distributor) - d2 = create(:distributor) - d3 = create(:distributor) + d1 = create(:distributor_enterprise) + d2 = create(:distributor_enterprise) + d3 = create(:distributor_enterprise) # And some of those distributors have a product create(:product, :distributors => [d1, d2]) @@ -29,7 +29,7 @@ feature %q{ context "when a distributor is selected" do it "displays the distributor's details" do # Given a distributor with a product - d = create(:distributor, :name => 'Melb Uni Co-op', :description => '
Hello, world!
') + d = create(:distributor_enterprise, :name => 'Melb Uni Co-op', :description => 'Hello, world!
') create(:product, :distributors => [d]) # When I select the distributor @@ -40,12 +40,12 @@ feature %q{ page.should have_selector 'h2', :text => 'Melb Uni Co-op' # And I should see the distributor's long description - page.should have_selector 'div.distributor-description', :text => 'Hello, world!' + page.should have_selector 'div.enterprise-description', :text => 'Hello, world!' end it "displays the distributor's name on the home page" do # Given a distributor with a product - d = create(:distributor, :name => 'Melb Uni Co-op', :description => 'Hello, world!
') + d = create(:distributor_enterprise, :name => 'Melb Uni Co-op', :description => 'Hello, world!
') create(:product, :distributors => [d]) # When I select the distributor @@ -63,8 +63,8 @@ feature %q{ taxonomy = Spree::Taxonomy.find_by_name('Products') || create(:taxonomy, :name => 'Products') taxonomy_root = taxonomy.root taxon = create(:taxon, :name => 'Taxon one', :parent_id => taxonomy_root.id) - d1 = create(:distributor) - d2 = create(:distributor) + d1 = create(:distributor_enterprise) + d2 = create(:distributor_enterprise) p1 = create(:product, :distributors => [d1], :taxons => [taxon]) p2 = create(:product, :distributors => [d2], :taxons => [taxon]) @@ -90,7 +90,7 @@ feature %q{ it "allows the user to leave the distributor" do # Given a distributor with a product - d = create(:distributor, :name => 'Melb Uni Co-op') + d = create(:distributor_enterprise, :name => 'Melb Uni Co-op') create(:product, :distributors => [d]) # When I select the distributor and then leave it @@ -105,7 +105,7 @@ feature %q{ context "viewing a product, it provides a choice of distributor when adding to cart" do it "works when no distributor is chosen" do # Given a distributor and a product under it - distributor = create(:distributor) + distributor = create(:distributor_enterprise) product = create(:product, :distributors => [distributor]) # When we view the product @@ -118,7 +118,7 @@ feature %q{ it "displays the local distributor as the default choice when available for the current product" do # Given a distributor and a product under it - distributor = create(:distributor) + distributor = create(:distributor_enterprise) product = create(:product, :distributors => [distributor]) # When we select the distributor and view the product @@ -132,8 +132,8 @@ feature %q{ it "works when viewing a product from a remote distributor" do # Given two distributors and our product under one - distributor_product = create(:distributor) - distributor_no_product = create(:distributor) + distributor_product = create(:distributor_enterprise) + distributor_no_product = create(:distributor_enterprise) product = create(:product, :distributors => [distributor_product]) create(:product, :distributors => [distributor_no_product]) diff --git a/spec/requests/consumer/product_spec.rb b/spec/requests/consumer/product_spec.rb index 97712d1e13..f86b3bb409 100644 --- a/spec/requests/consumer/product_spec.rb +++ b/spec/requests/consumer/product_spec.rb @@ -10,8 +10,8 @@ feature %q{ scenario "viewing a product shows its supplier and distributor" do # Given a product with a supplier and distributor - s = create(:supplier) - d = create(:distributor) + s = create(:supplier_enterprise) + d = create(:distributor_enterprise) p = create(:product, :supplier => s, :distributors => [d]) # When I view the product diff --git a/spec/requests/consumer/suppliers_spec.rb b/spec/requests/consumer/suppliers_spec.rb index 1c88ffd64f..ab1f90a493 100644 --- a/spec/requests/consumer/suppliers_spec.rb +++ b/spec/requests/consumer/suppliers_spec.rb @@ -10,9 +10,9 @@ feature %q{ scenario "viewing a list of suppliers in the sidebar" do # Given some suppliers - s1 = create(:supplier) - s2 = create(:supplier) - s3 = create(:supplier) + s1 = create(:supplier_enterprise) + s2 = create(:supplier_enterprise) + s3 = create(:supplier_enterprise) # And some of those suppliers have a product create(:product, :supplier => s1) @@ -29,9 +29,9 @@ feature %q{ scenario "viewing a list of all suppliers" do # Given some suppliers - s1 = create(:supplier) - s2 = create(:supplier) - s3 = create(:supplier) + s1 = create(:supplier_enterprise) + s2 = create(:supplier_enterprise) + s3 = create(:supplier_enterprise) # And some of those suppliers have a product create(:product, :supplier => s1) @@ -49,7 +49,7 @@ feature %q{ scenario "viewing products provided by a supplier" do # Given a supplier with a product - s = create(:supplier, :name => 'Murrnong', :long_description => "Hello, world!
") + s = create(:supplier_enterprise, :name => 'Murrnong', :long_description => "Hello, world!
") p = create(:product, :supplier => s) # When I select the supplier @@ -58,7 +58,7 @@ feature %q{ # Then I should see the supplier details page.should have_selector 'h2', :text => s.name - page.should have_selector 'div.supplier-description', :text => 'Hello, world!' + page.should have_selector 'div.enterprise-description', :text => 'Hello, world!' # And I should see the product page.should have_content p.name diff --git a/spec/requests/consumer/taxonomy_spec.rb b/spec/requests/consumer/taxonomy_spec.rb index 2b606a9406..9a2190c1a0 100644 --- a/spec/requests/consumer/taxonomy_spec.rb +++ b/spec/requests/consumer/taxonomy_spec.rb @@ -40,8 +40,8 @@ feature %q{ taxon_two = create(:taxon, :name => 'Taxon two', :parent_id => taxonomy_root.id) taxon_three = create(:taxon, :name => 'Taxon three', :parent_id => taxonomy_root.id) - my_distributor = create(:distributor, :name => 'My Distributor') - other_distributor = create(:distributor, :name => 'Other Distributor') + my_distributor = create(:distributor_enterprise, :name => 'My Distributor') + other_distributor = create(:distributor_enterprise, :name => 'Other Distributor') 1.times { create(:product, :taxons => [taxon_one], :distributors => [other_distributor]) } 2.times { create(:product, :taxons => [taxon_two], :distributors => [other_distributor]) }