This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
mastodon/spec/models/export_spec.rb

18 lines
446 B
Ruby
Raw Normal View History

require 'rails_helper'
describe Export do
describe 'to_csv' do
it 'returns a csv of the accounts' do
one = Account.new(username: 'one', domain: 'local.host')
two = Account.new(username: 'two', domain: 'local.host')
accounts = [one, two]
export = Export.new(accounts).to_csv
results = export.strip.split
expect(results.size).to eq 2
expect(results.first).to eq 'one@local.host'
end
end
end