Skip to content

Commit

Permalink
Merge pull request #183 from cortex-lab/tests-update
Browse files Browse the repository at this point in the history
Fix for incorrect use of test attribute
  • Loading branch information
k1o0 authored Jul 19, 2019
2 parents 2b6b45c + eb5e9b9 commit 3437b6c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/AlyxPanel_test.m
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@ function test_launchSessionURL(testCase, BaseURL)
% TODO Use DELETE to test both creating new session and viewing
% existing
p = testCase.Panel;
baseURL = p.AlyxInstance.BaseURL;
testCase.Mock.InTest = true;
testCase.Mock.UseDefaults = false;
% Set new subject
Expand All @@ -251,7 +252,7 @@ function test_launchSessionURL(testCase, BaseURL)
expected = url;
else
uuid = todaySession.url(find(todaySession.url=='/', 1, 'last')+1:end);
expected = [BaseURL '/admin/actions/session/', uuid, '/change'];
expected = [baseURL '/admin/actions/session/', uuid, '/change'];
end

testCase.verifyEqual(url, expected, 'Unexpected url')
Expand All @@ -262,11 +263,12 @@ function test_launchSessionURL(testCase, BaseURL)
function test_launchSubjectURL(testCase, BaseURL)
% Test the launch of the subject page in the admin Web interface
p = testCase.Panel;
baseURL = p.AlyxInstance.BaseURL;
% Set new subject
testCase.SubjectUI.Selected = testCase.SubjectUI.Option{2};
[failed, url] = p.launchSubjectURL;
testCase.verifyTrue(~failed, 'Failed to launch subject page in browser')
expected = [BaseURL '/admin/subjects/subject/'...
expected = [baseURL '/admin/subjects/subject/'...
'bcefd268-68c2-4ea8-9b60-588ee4e99ebb/change'];
testCase.verifyEqual(url, expected, 'unexpected subject page url')
end
Expand Down

0 comments on commit 3437b6c

Please sign in to comment.