summaryrefslogtreecommitdiff
path: root/test/mock_pkg_resource.erl
diff options
context:
space:
mode:
authorFred Hebert <mononcqc@ferd.ca>2015-02-23 22:57:34 +0000
committerFred Hebert <mononcqc@ferd.ca>2015-02-23 23:05:59 +0000
commitc283dd2c69174586e5964654a5fec8eeb66f6b6c (patch)
treefc96c62215eb008cc3ef4382ef6a67efa6c571f8 /test/mock_pkg_resource.erl
parent249be4985c130f8cc096033e2aa8305b99817aa5 (diff)
Add tests and fixes for packages upgrades
- Track level of packages properly, they're not level 0 anymore (this could yield an issue where a src dep takes precedence over a pkg dep) - Proper stable sort of vertices in the digraph module - PkgDeps no longer 'see themselves' when fetching and upgrading after locking themselves - Pkg Locks are added to pkg deps rather than source deps - Updating test cases to support pkg mocking on top of src mocking
Diffstat (limited to 'test/mock_pkg_resource.erl')
-rw-r--r--test/mock_pkg_resource.erl4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/mock_pkg_resource.erl b/test/mock_pkg_resource.erl
index c7276b6..a22d1b0 100644
--- a/test/mock_pkg_resource.erl
+++ b/test/mock_pkg_resource.erl
@@ -47,11 +47,11 @@ mock_lock(_) ->
%% @doc The config passed to the `mock/2' function can specify which apps
%% should be updated on a per-name basis: `{update, ["App1", "App3"]}'.
mock_update(Opts) ->
- ToUpdate = proplists:get_value(update, Opts, []),
+ ToUpdate = proplists:get_value(upgrade, Opts, []),
meck:expect(
?MOD, needs_update,
fun(_Dir, {pkg, App, _Vsn}) ->
- lists:member(App, ToUpdate)
+ lists:member(binary_to_list(App), ToUpdate)
end).
%% @doc Replicated an unsupported call.