comparison tests/src/libirccd/command-plugin-info/main.cpp @ 731:9d13aabfd63a

Irccd: plugin now have internal id
author David Demelier <markand@malikania.fr>
date Thu, 19 Jul 2018 07:22:36 +0200
parents ae88795feb99
children 190b16cfa848
comparison
equal deleted inserted replaced
730:2496ebc42b07 731:9d13aabfd63a
28 28
29 namespace { 29 namespace {
30 30
31 class sample_plugin : public plugin { 31 class sample_plugin : public plugin {
32 public: 32 public:
33 sample_plugin()
34 : plugin("test")
35 {
36 }
37
33 auto get_name() const noexcept -> std::string_view override 38 auto get_name() const noexcept -> std::string_view override
34 { 39 {
35 return "test"; 40 return "test";
36 } 41 }
37 42
61 BOOST_AUTO_TEST_CASE(basic) 66 BOOST_AUTO_TEST_CASE(basic)
62 { 67 {
63 auto plg = std::make_unique<sample_plugin>(); 68 auto plg = std::make_unique<sample_plugin>();
64 auto response = nlohmann::json(); 69 auto response = nlohmann::json();
65 70
66 daemon_->plugins().add("test", std::move(plg)); 71 daemon_->plugins().add(std::move(plg));
67 72
68 const auto result = request({ 73 const auto result = request({
69 { "command", "plugin-info" }, 74 { "command", "plugin-info" },
70 { "plugin", "test" }, 75 { "plugin", "test" },
71 }); 76 });