mirror of
https://github.com/zhigang1992/tsemple.git
synced 2026-01-12 17:52:57 +08:00
14 lines
328 B
Ruby
14 lines
328 B
Ruby
require 'test_helper'
|
|
|
|
class AttachmentsControllerTest < ActionController::TestCase
|
|
def setup
|
|
login_as create(:user)
|
|
end
|
|
|
|
test "should create attachment" do
|
|
assert_difference "current_user.attachments.count" do
|
|
post :create, attachment: { file: upload_file('app/assets/images/rails.png') }
|
|
end
|
|
end
|
|
end
|