test/test_telepost.rb in telepost-0.3.2 vs test/test_telepost.rb in telepost-0.4.0

- old
+ new

@@ -1,10 +1,10 @@ # frozen_string_literal: true # (The MIT License) # -# Copyright (c) 2018-2019 Yegor Bugayenko +# Copyright (c) 2018-2024 Yegor Bugayenko # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the 'Software'), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell @@ -25,15 +25,24 @@ require 'minitest/autorun' require_relative '../lib/telepost' # Telepost test. # Author:: Yegor Bugayenko (yegor256@gmail.com) -# Copyright:: Copyright (c) 2018-2019 Yegor Bugayenko +# Copyright:: Copyright (c) 2018-2024 Yegor Bugayenko # License:: MIT class TelepostTest < Minitest::Test def test_fake_posting tp = Telepost::Fake.new tp.run tp.post('This is', 'a simple', 'message') assert_equal(1, tp.sent.count) + end + + def test_real_posting + skip + tp = Telepost.new( + '1088589765:...', + chats: [-1_001_438_256_738] # codexia channel + ) + tp.spam('This is just a test message') end end