Merge lp:~alecu/unity-scope-click/enable-purchases into lp:unity-scope-click

Proposed by Alejandro J. Cura
Status: Merged
Approved by: dobey
Approved revision: 298
Merged at revision: 296
Proposed branch: lp:~alecu/unity-scope-click/enable-purchases
Merge into: lp:unity-scope-click
Diff against target: 38 lines (+5/-2)
3 files modified
libclickscope/click/configuration.h (+1/-1)
libclickscope/tests/test_configuration.cpp (+1/-1)
scope/tests/test_query.cpp (+3/-0)
To merge this branch: bzr merge lp:~alecu/unity-scope-click/enable-purchases
Reviewer Review Type Date Requested Status
dobey (community) Approve
PS Jenkins bot continuous-integration Approve
Review via email: mp+241964@code.launchpad.net

Commit message

Enable purchases by default

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
297. By Alejandro J. Cura

Fix for the failing unit test

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
298. By Alejandro J. Cura

No need to test purchases in testQueryRunCallsAddAvailableApps

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
dobey (dobey) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'libclickscope/click/configuration.h'
2--- libclickscope/click/configuration.h 2014-10-01 02:49:21 +0000
3+++ libclickscope/click/configuration.h 2014-11-17 16:21:07 +0000
4@@ -46,7 +46,7 @@
5 constexpr static const char* ARCH_ENVVAR {"U1_SEARCH_ARCH"};
6 constexpr static const char* LANGUAGE_ENVVAR {"LANGUAGE"};
7 constexpr static const char* PURCHASES_ENVVAR {"CLICK_STORE_ENABLE_PURCHASES"};
8- constexpr static const bool PURCHASES_DEFAULT = false;
9+ constexpr static const bool PURCHASES_DEFAULT = true;
10 constexpr static const char* CURRENCY_ENVVAR {"U1_SEARCH_CURRENCY"};
11 constexpr static const char* CURRENCY_DEFAULT {"USD"};
12 static const std::map<const std::string, const std::string> CURRENCY_MAP;
13
14=== modified file 'libclickscope/tests/test_configuration.cpp'
15--- libclickscope/tests/test_configuration.cpp 2014-10-01 13:11:49 +0000
16+++ libclickscope/tests/test_configuration.cpp 2014-11-17 16:21:07 +0000
17@@ -242,7 +242,7 @@
18 TEST(Configuration, getPurchasesEnabledDefault)
19 {
20 ASSERT_EQ(unsetenv(Configuration::PURCHASES_ENVVAR), 0);
21- ASSERT_EQ(false, Configuration().get_purchases_enabled());
22+ ASSERT_EQ(true, Configuration().get_purchases_enabled());
23 }
24
25 TEST(Configuration, getCurrencyDefault)
26
27=== modified file 'scope/tests/test_query.cpp'
28--- scope/tests/test_query.cpp 2014-10-17 19:36:02 +0000
29+++ scope/tests/test_query.cpp 2014-11-17 16:21:07 +0000
30@@ -229,6 +229,9 @@
31 EXPECT_CALL(q, get_installed_packages()).WillOnce(Return(no_installed_packages));
32 EXPECT_CALL(q, add_available_apps(reply, no_installed_packages, _));
33
34+ // No need to test purchases in this testcase
35+ ASSERT_EQ(setenv(Configuration::PURCHASES_ENVVAR, "0", 1), 0);
36+
37 q.run(reply);
38 }
39

Subscribers

People subscribed via source and target branches