spec/system/manifestations_spec.rb in enju_biblio-0.4.0.beta.1 vs spec/system/manifestations_spec.rb in enju_biblio-0.4.0.beta.2
- old
+ new
@@ -16,10 +16,16 @@
it 'should show default item' do
visit manifestation_path(@item.manifestation.id, locale: :ja)
expect(page).to have_content @item.item_identifier
end
+
+ 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
end
describe 'When logged in as User' do
before do
sign_in users(:user1)
@@ -27,14 +33,26 @@
it 'should show default item' do
visit manifestation_path(@item.manifestation.id, locale: :ja)
expect(page).to have_content @item.item_identifier
end
+
+ 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
end
describe 'When not logged in' do
it 'should show default item' do
visit manifestation_path(@item.manifestation.id, locale: :ja)
expect(page).to have_content @item.item_identifier
+ end
+
+ 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
end
end