mirror of
https://github.com/clementine-player/Clementine
synced 2024-12-20 22:34:37 +01:00
Fix musicbrainz tests.
This commit is contained in:
parent
8b5a6eb1f8
commit
b3481a9839
@ -26,15 +26,14 @@
|
|||||||
#include <QMetaType>
|
#include <QMetaType>
|
||||||
#include <QSignalSpy>
|
#include <QSignalSpy>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
#include <QStringList>
|
||||||
|
|
||||||
#include "mock_networkaccessmanager.h"
|
#include "mock_networkaccessmanager.h"
|
||||||
#include "gtest/gtest.h"
|
#include "gtest/gtest.h"
|
||||||
#include "test_utils.h"
|
#include "test_utils.h"
|
||||||
|
|
||||||
namespace {
|
|
||||||
typedef QList<MusicBrainzClient::Result> ResultList;
|
typedef QList<MusicBrainzClient::Result> ResultList;
|
||||||
Q_DECLARE_METATYPE(ResultList);
|
Q_DECLARE_METATYPE(ResultList);
|
||||||
};
|
|
||||||
|
|
||||||
class MusicBrainzClientTest : public ::testing::Test {
|
class MusicBrainzClientTest : public ::testing::Test {
|
||||||
protected:
|
protected:
|
||||||
@ -193,7 +192,7 @@ TEST_F(MusicBrainzClientTest, ParseTrack) {
|
|||||||
// Start the request and get a result.
|
// Start the request and get a result.
|
||||||
// The mbid argument doesn't matter in the test.
|
// The mbid argument doesn't matter in the test.
|
||||||
const int sent_id = 0;
|
const int sent_id = 0;
|
||||||
musicbrainz_client.Start(sent_id, "fooMbid");
|
musicbrainz_client.Start(sent_id, QStringList() << "fooMbid");
|
||||||
discid_reply->Done();
|
discid_reply->Done();
|
||||||
QCoreApplication::processEvents(QEventLoop::ExcludeUserInputEvents);
|
QCoreApplication::processEvents(QEventLoop::ExcludeUserInputEvents);
|
||||||
EXPECT_EQ(1, spy.count());
|
EXPECT_EQ(1, spy.count());
|
||||||
@ -236,7 +235,7 @@ TEST_F(MusicBrainzClientTest, ParseTrackWithMultipleReleases) {
|
|||||||
// Start the request and get a result.
|
// Start the request and get a result.
|
||||||
// The mbid argument doesn't matter in the test.
|
// The mbid argument doesn't matter in the test.
|
||||||
const int sent_id = 0;
|
const int sent_id = 0;
|
||||||
musicbrainz_client.Start(sent_id, "fooMbid");
|
musicbrainz_client.Start(sent_id, QStringList() << "fooMbid");
|
||||||
discid_reply->Done();
|
discid_reply->Done();
|
||||||
QCoreApplication::processEvents(QEventLoop::ExcludeUserInputEvents);
|
QCoreApplication::processEvents(QEventLoop::ExcludeUserInputEvents);
|
||||||
EXPECT_EQ(1, spy.count());
|
EXPECT_EQ(1, spy.count());
|
||||||
|
Loading…
Reference in New Issue
Block a user