Public view for suggested actions as well as resources has been completelly redesigned. Private side for this feature has been adapted as well in order to meet the requirements.
30 lines
571 B
Ruby
30 lines
571 B
Ruby
require 'rails_helper'
|
|
|
|
describe Link do
|
|
subject do
|
|
build :link,
|
|
linkable: proposal_dashboard_action,
|
|
label: label,
|
|
url: url,
|
|
open_in_new_tab: true
|
|
end
|
|
|
|
let(:proposal_dashboard_action) { build :proposal_dashboard_action }
|
|
let(:label) { Faker::Lorem.sentence }
|
|
let(:url) { Faker::Internet.url }
|
|
|
|
it { should be_valid }
|
|
|
|
context 'when label is blank' do
|
|
let(:label) { '' }
|
|
|
|
it { should_not be_valid }
|
|
end
|
|
|
|
context 'when url is blank' do
|
|
let(:url) { '' }
|
|
|
|
it { should_not be_valid }
|
|
end
|
|
end
|