From 1d48fe9621447a36965fdaca452af5f06b0e7f2d Mon Sep 17 00:00:00 2001 From: Pete Matsyburka Date: Sun, 1 Jun 2025 15:41:44 +0300 Subject: [PATCH] fix spec --- spec/system/template_share_link_spec.rb | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/spec/system/template_share_link_spec.rb b/spec/system/template_share_link_spec.rb index 8930812b..23499434 100644 --- a/spec/system/template_share_link_spec.rb +++ b/spec/system/template_share_link_spec.rb @@ -24,27 +24,15 @@ RSpec.describe 'Template Share Link' do end.to change { template.reload.shared_link }.from(false).to(true) end - it 'makes the template shareable when copying the shareable link' do + it 'makes the template shareable on toggle' do click_on 'Link' expect do within '#modal' do - find('clipboard-copy').click + find('#template_shared_link').click end end.to change { template.reload.shared_link }.from(false).to(true) end - - it 'copies the shareable link without changing its status' do - template.update(shared_link: true) - - click_on 'Link' - - expect do - within '#modal' do - find('clipboard-copy').click - end - end.not_to(change { template.reload.shared_link }) - end end context 'when the template is already shareable' do