From 99ae274ef8bb19be514dc2a86527b69b89f59da9 Mon Sep 17 00:00:00 2001 From: "J. King" Date: Tue, 16 May 2017 22:24:36 -0400 Subject: [PATCH] Also test negative read marks --- sql/SQLite3/0.sql | 3 ++- tests/lib/Database/SeriesSubscription.php | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/sql/SQLite3/0.sql b/sql/SQLite3/0.sql index 43f3687..f7e156f 100644 --- a/sql/SQLite3/0.sql +++ b/sql/SQLite3/0.sql @@ -91,7 +91,8 @@ create table arsse_marks( owner TEXT not null references arsse_users(id) on delete cascade on update cascade, read boolean not null default 0, starred boolean not null default 0, - modified datetime not null default CURRENT_TIMESTAMP + modified datetime not null default CURRENT_TIMESTAMP, + unique(article,owner) ); -- IDs for specific editions of articles (required for at least NextCloud News) diff --git a/tests/lib/Database/SeriesSubscription.php b/tests/lib/Database/SeriesSubscription.php index d5ca245..f88b8e2 100644 --- a/tests/lib/Database/SeriesSubscription.php +++ b/tests/lib/Database/SeriesSubscription.php @@ -76,7 +76,7 @@ trait SeriesSubscription { [8,8,"jane.doe@example.com",true,false], [9, 1,"john.doe@example.com",true,false], [10,7,"john.doe@example.com",true,false], - [11,8,"john.doe@example.com",true,false], + [11,8,"john.doe@example.com",false,false], ] ], ]; @@ -199,7 +199,7 @@ trait SeriesSubscription { 'url' => "http://example.com/feed3", 'title' => "Ook", 'folder' => 2, - 'unread' => 1, + 'unread' => 2, ], ]; $this->assertResult($exp, Data::$db->subscriptionList($user));