logic_controller_test.rb revision 813c1fb6ef7f1d386c65abf8d79389be3cb0f4e9
require 'test_helper'
setup do
end
context 'on GET to show' do
context 'not signed in' do
setup do
end
# should assign_to :translatables
end
context 'signed in as Logic-Owner' do
setup do
end
# should assign_to :translatables
end
end
context 'in GET to index' do
setup do
end
end
context 'on POST to create' do
setup do
:name => @logic2.name,
:iri => @logic2.iri
}
end
should "create the record" do
end
should respond_with :redirect
end
context 'on POST to update' do
context 'signed in' do
setup do
:role => 'owner',
@oldname = @logic.name
:name => "test3"
}
end
should "not leave the record" do
end
should "change the record" do
end
should respond_with :redirect
end
context 'not signed in' do
setup do
:role => 'owner',
@oldname = @logic.name
:name => "test3"
}
end
should "leave the record" do
end
should "not change the record" do
end
should respond_with :redirect
end
context 'not permitted' do
setup do
@oldname = @logic.name
:name => "test3"
}
end
should "leave the record" do
end
should "not change the record" do
end
should respond_with :redirect
end
end
context 'on POST to DELETE' do
context 'signed in' do
setup do
:role => 'owner',
end
should "not leave the record" do
end
should respond_with :redirect
end
context 'not signed in' do
setup do
:role => 'owner',
end
should "leave the record" do
end
should respond_with :redirect
end
context 'not permitted' do
setup do
end
should "leave the record" do
end
should respond_with :redirect
end
end
end