Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-10-02 06:06:35 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-10-02 06:06:35 +0300
commitd14219486e0f3b6e642eaeff0862dea169e5d260 (patch)
tree6c8536e27d0abb3844414a18b1478c28116d42a7 /spec
parent587794b4b8a6e919e77ee4abe8215fa291e6a91d (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec')
-rw-r--r--spec/graphql/types/issue_type_spec.rb2
-rw-r--r--spec/models/user_spec.rb8
2 files changed, 9 insertions, 1 deletions
diff --git a/spec/graphql/types/issue_type_spec.rb b/spec/graphql/types/issue_type_spec.rb
index 1621319e618..59c42aa446d 100644
--- a/spec/graphql/types/issue_type_spec.rb
+++ b/spec/graphql/types/issue_type_spec.rb
@@ -10,7 +10,7 @@ describe GitlabSchema.types['Issue'] do
it { expect(described_class.interfaces).to include(Types::Notes::NoteableType.to_graphql) }
it 'has specific fields' do
- fields = %i[iid title description state reference author assignees participants labels epic milestone due_date
+ fields = %i[iid title description state reference author assignees participants labels milestone due_date
confidential discussion_locked upvotes downvotes user_notes_count web_path web_url relative_position
time_estimate total_time_spent closed_at created_at updated_at task_completion_status]
diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb
index a26b2979855..25e17f3bec4 100644
--- a/spec/models/user_spec.rb
+++ b/spec/models/user_spec.rb
@@ -1427,10 +1427,18 @@ describe User do
expect(described_class.search(user.username)).to eq([user, user2])
end
+ it 'returns users with a matching username starting with a @' do
+ expect(described_class.search("@#{user.username}")).to eq([user, user2])
+ end
+
it 'returns users with a partially matching username' do
expect(described_class.search(user.username[0..2])).to eq([user, user2])
end
+ it 'returns users with a partially matching username starting with @' do
+ expect(described_class.search("@#{user.username[0..2]}")).to eq([user, user2])
+ end
+
it 'returns users with a matching username regardless of the casing' do
expect(described_class.search(user2.username.upcase)).to eq([user2])
end