mirror of
https://github.com/discourse/discourse.git
synced 2025-06-04 11:11:13 +08:00
Initial release of Discourse
This commit is contained in:
24
spec/components/import/adapter/base_spec.rb
Normal file
24
spec/components/import/adapter/base_spec.rb
Normal file
@ -0,0 +1,24 @@
|
||||
require 'spec_helper'
|
||||
require 'import/adapter/base'
|
||||
|
||||
describe Import::Adapter::Base do
|
||||
|
||||
describe 'the base implementation' do
|
||||
let(:adapter) { Import::Adapter::Base.new }
|
||||
|
||||
describe 'apply_to_column_names' do
|
||||
it 'should return the column names passed in' do
|
||||
cols = ['first', 'second']
|
||||
adapter.apply_to_column_names('table_name', cols).should == cols
|
||||
end
|
||||
end
|
||||
|
||||
describe 'apply_to_row' do
|
||||
it 'should return the row passed in' do
|
||||
row = [1,2,3,4]
|
||||
adapter.apply_to_row('table_name', row).should == row
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
end
|
Reference in New Issue
Block a user