mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-06 22:36:07 +00:00
Adding confirmed_at to enterprise factory
This commit is contained in:
@@ -97,6 +97,7 @@ FactoryGirl.define do
|
||||
long_description '<p>Hello, world!</p><p>This is a paragraph.</p>'
|
||||
email 'enterprise@example.com'
|
||||
address { FactoryGirl.create(:address) }
|
||||
confirmed_at { Time.now }
|
||||
end
|
||||
|
||||
factory :supplier_enterprise, :parent => :enterprise do
|
||||
|
||||
@@ -3,14 +3,14 @@ require 'spec_helper'
|
||||
feature %q{
|
||||
As a consumer
|
||||
I want to see a list of producers
|
||||
So that I can shop at hubs distributing their products
|
||||
So that I can shop at hubs distributing their products
|
||||
}, js: true do
|
||||
include UIComponentHelper
|
||||
let!(:producer) { create(:supplier_enterprise) }
|
||||
let!(:invisible_producer) { create(:supplier_enterprise, visible: false) }
|
||||
let(:taxon) { create(:taxon) }
|
||||
let!(:product) { create(:simple_product, supplier: producer, taxons: [taxon]) }
|
||||
|
||||
|
||||
before do
|
||||
visit producers_path
|
||||
end
|
||||
@@ -20,7 +20,7 @@ feature %q{
|
||||
expand_active_table_node producer.name
|
||||
page.should have_content producer.supplied_taxons.first.name.split.map(&:capitalize).join(' ')
|
||||
end
|
||||
|
||||
|
||||
it "doesn't show invisible producers" do
|
||||
page.should_not have_content invisible_producer.name
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user