Files
nairobi/spec/models/link_spec.rb
Juan Salvador Pérez García 3c3f60dfcc Implements #173
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.
2018-07-17 17:58:22 +02:00

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