spec/system/manifestations_spec.rb in enju_biblio-0.3.9 vs spec/system/manifestations_spec.rb in enju_biblio-0.3.10.rc.1

- old
+ new

@@ -22,10 +22,16 @@ it 'should show memo' do @item.manifestation.update(memo: 'memo') visit manifestation_path(@item.manifestation.id, locale: :ja) expect(page).to have_content @item.manifestation.memo end + + it 'should show custom properties' do + @item.manifestation.manifestation_custom_values << FactoryBot.build(:manifestation_custom_value) + visit manifestation_path(@item.manifestation.id, locale: :ja) + expect(page).to have_content @item.manifestation.manifestation_custom_values.first.value + end end describe 'When logged in as User' do before do sign_in users(:user1) @@ -38,9 +44,15 @@ it 'should not show memo' do @item.manifestation.update(memo: 'memo') visit manifestation_path(@item.manifestation.id, locale: :ja) expect(page).not_to have_content @item.manifestation.memo + end + + it 'should not show custom properties' do + @item.manifestation.manifestation_custom_values << FactoryBot.build(:manifestation_custom_value) + visit manifestation_path(@item.manifestation.id, locale: :ja) + expect(page).not_to have_content @item.manifestation.manifestation_custom_values.first.value end end describe 'When not logged in' do it 'should show default item' do