pull/493/head
Pete Matsyburka 5 months ago
parent 9544bb3d76
commit 1d48fe9621

@ -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

Loading…
Cancel
Save