Sha256: 7e965ba79d6de2e48b3ca7cf9e2aa42e3f23033e2653e85af7054f4044825146
Contents?: true
Size: 952 Bytes
Versions: 2
Compression:
Stored size: 952 Bytes
Contents
require 'spec_helper' describe 'Shared show', js: true do subject { page } let(:user) { get_user } let!(:category){ FactoryGirl.create(:category) } let!(:product) { FactoryGirl.create(:product) } let!(:photo) { FactoryGirl.create(:photo) } before do Adminpanel::User.delete_all visit adminpanel.signin_path valid_signin_as_admin(user) product.category_ids = [category.id] photo.product_id = product.id visit adminpanel.product_path(product) end after do Adminpanel::User.delete_all end it { page.should have_selector('div', text: product.name) } it { page.should have_selector('div', text: product.price) } it { page.should have_selector('div', text: product.description) } it { should have_content("#{I18n.t("gallery.container")}: #{Adminpanel::Product.display_name}")} it { should have_content("#{category.name}")} it { should have_link('i', adminpanel.edit_product_path(product)) } end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
adminpanel-2.1.1 | spec/features/shared_pages/show_spec.rb |
adminpanel-2.1.0 | spec/features/shared_pages/show_spec.rb |