parent
8ef7dd34f8
commit
9b947099c7
@ -0,0 +1,25 @@ |
||||
|
||||
require 'spec_helper' |
||||
|
||||
describe 'taskboard_card_configurations/edit' do |
||||
let(:config) { FactoryGirl.build(:taskboard_card_configuration) } |
||||
|
||||
before do |
||||
config.save |
||||
assign(:config, config) |
||||
end |
||||
|
||||
it 'shows edit taskboard card configuration inputs' do |
||||
render |
||||
|
||||
rendered.should have_selector("form") do |f| |
||||
f.should have_selector("input", value: config.identifier) |
||||
f.should have_selector("input", value: config.name) |
||||
f.should have_selector("input", value: config.rows) |
||||
f.should have_selector("input", value: config.per_page) |
||||
f.should have_selector("input", value: config.page_size) |
||||
f.should have_selector("input", value: config.orientation) |
||||
end |
||||
end |
||||
|
||||
end |
@ -0,0 +1,21 @@ |
||||
|
||||
require 'spec_helper' |
||||
|
||||
describe 'taskboard_card_configurations/index' do |
||||
let(:config1) { FactoryGirl.build(:taskboard_card_configuration, name: "Config 1") } |
||||
let(:config2) { FactoryGirl.build(:taskboard_card_configuration, name: "Config 2") } |
||||
|
||||
before do |
||||
config1.save |
||||
config2.save |
||||
assign(:configs, [config1, config2]) |
||||
end |
||||
|
||||
it 'shows taskboard card configurations' do |
||||
render |
||||
|
||||
rendered.should have_selector("a", text: config1.name) |
||||
rendered.should have_selector("a", text: config1.name) |
||||
end |
||||
|
||||
end |
@ -0,0 +1,24 @@ |
||||
|
||||
require 'spec_helper' |
||||
|
||||
describe 'taskboard_card_configurations/new' do |
||||
let(:config) { FactoryGirl.build(:taskboard_card_configuration) } |
||||
|
||||
before do |
||||
assign(:config, config) |
||||
end |
||||
|
||||
it 'shows new taskboard card configuration empty inputs' do |
||||
render |
||||
|
||||
rendered.should have_selector("form") do |f| |
||||
f.should have_selector("input", value: "") |
||||
f.should have_selector("input", value: "") |
||||
f.should have_selector("input", value: "") |
||||
f.should have_selector("input", value: "") |
||||
f.should have_selector("input", value: "") |
||||
f.should have_selector("input", value: "") |
||||
end |
||||
end |
||||
|
||||
end |
Loading…
Reference in new issue