diff options
author | David Lawrence <dkl@mozilla.com> | 2016-08-31 06:24:56 +0200 |
---|---|---|
committer | David Lawrence <dkl@mozilla.com> | 2016-08-31 06:24:56 +0200 |
commit | 1df1a7b9ea4cd24235d344d495a874de40624612 (patch) | |
tree | f09a46880a81149cceceabe466cec1ea74d8d80b /xt/webservice | |
parent | 3a903b41328ba20072570c9fde36b332ea082f03 (diff) | |
download | bugzilla-1df1a7b9ea4cd24235d344d495a874de40624612.tar.gz bugzilla-1df1a7b9ea4cd24235d344d495a874de40624612.tar.xz |
- Fixed API tests to work after login/email changes
Diffstat (limited to 'xt/webservice')
-rw-r--r-- | xt/webservice/bug_attachments.t | 4 | ||||
-rw-r--r-- | xt/webservice/bug_comments.t | 1 | ||||
-rw-r--r-- | xt/webservice/user_get.t | 4 |
3 files changed, 5 insertions, 4 deletions
diff --git a/xt/webservice/bug_attachments.t b/xt/webservice/bug_attachments.t index 2150a0ff8..b0e6af81c 100644 --- a/xt/webservice/bug_attachments.t +++ b/xt/webservice/bug_attachments.t @@ -141,8 +141,8 @@ sub post_success { "content_type is correct"); cmp_ok($attachment->{file_name}, '=~', qr/^\w+\.pl$/, "filename is in the expected format"); - is($attachment->{creator}, $config->{QA_Selenium_TEST_user_login}, - "creator is the correct user"); + is($attachment->{creator}, ($t->{user} ? $config->{QA_Selenium_TEST_user_login} : email_filter($config->{QA_Selenium_TEST_user_login})), + "creator is the correct user"); my $data = $attachment->{data}; $data = decode_base64($data) if $rpc->isa('QA::RPC::JSONRPC'); is($data, $content, 'data is correct'); diff --git a/xt/webservice/bug_comments.t b/xt/webservice/bug_comments.t index 2312083d6..107f866c3 100644 --- a/xt/webservice/bug_comments.t +++ b/xt/webservice/bug_comments.t @@ -47,6 +47,7 @@ sub test_comments { is($comment->{text}, $expected_text, "comment has the correct text"); my $priv_login = $rpc->bz_config->{PRIVATE_BUG_USER . '_user_login'}; + $priv_login = $t->{user} ? $priv_login : email_filter($priv_login); is($comment->{creator}, $priv_login, "comment creator is correct"); my $creation_day; diff --git a/xt/webservice/user_get.t b/xt/webservice/user_get.t index a31e957b4..835b48153 100644 --- a/xt/webservice/user_get.t +++ b/xt/webservice/user_get.t @@ -137,8 +137,8 @@ sub post_success { 'Admin correctly gets all user fields'); } elsif ($user) { - ok(exists $item->{email} && exists $item->{can_login}, - 'Logged-in user correctly gets email and can_login'); + ok(exists $item->{can_login}, + 'Logged-in user correctly gets can_login'); ok(!exists $item->{email_enabled} && !exists $item->{login_denied_text}, "Non-admin user doesn't get email_enabled and login_denied_text"); |