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
diff options
context:
space:
mode:
authorMarin Jankovski <maxlazio@gmail.com>2019-07-03 12:55:56 +0300
committerMarin Jankovski <maxlazio@gmail.com>2019-07-03 12:55:56 +0300
commitc20c9e2940b0f94547246d05b7b526f0b1571027 (patch)
treec548960a37ab7447ff542e0844e838f973c118fb /spec/graphql
parent49d689fb3c7781c861f995aaafef4b224581020b (diff)
parent2ca9bda400c0ed647c3ef342dcc0aa56c558cebe (diff)
Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce
Diffstat (limited to 'spec/graphql')
-rw-r--r--spec/graphql/gitlab_schema_spec.rb2
-rw-r--r--spec/graphql/types/award_emojis/award_emoji_type_spec.rb11
-rw-r--r--spec/graphql/types/commit_type_spec.rb11
-rw-r--r--spec/graphql/types/tree/tree_type_spec.rb2
4 files changed, 24 insertions, 2 deletions
diff --git a/spec/graphql/gitlab_schema_spec.rb b/spec/graphql/gitlab_schema_spec.rb
index 4076c1f824b..d36e428a8ee 100644
--- a/spec/graphql/gitlab_schema_spec.rb
+++ b/spec/graphql/gitlab_schema_spec.rb
@@ -113,7 +113,7 @@ describe GitlabSchema do
end
it "raises a meaningful error if a global id couldn't be generated" do
- expect { described_class.id_from_object(build(:commit)) }
+ expect { described_class.id_from_object(build(:wiki_directory)) }
.to raise_error(RuntimeError, /include `GlobalID::Identification` into/i)
end
end
diff --git a/spec/graphql/types/award_emojis/award_emoji_type_spec.rb b/spec/graphql/types/award_emojis/award_emoji_type_spec.rb
new file mode 100644
index 00000000000..5663a3d7195
--- /dev/null
+++ b/spec/graphql/types/award_emojis/award_emoji_type_spec.rb
@@ -0,0 +1,11 @@
+# frozen_string_literal: true
+
+require 'spec_helper'
+
+describe GitlabSchema.types['AwardEmoji'] do
+ it { expect(described_class.graphql_name).to eq('AwardEmoji') }
+
+ it { is_expected.to require_graphql_authorizations(:read_emoji) }
+
+ it { expect(described_class).to have_graphql_fields(:description, :unicode_version, :emoji, :name, :unicode, :user) }
+end
diff --git a/spec/graphql/types/commit_type_spec.rb b/spec/graphql/types/commit_type_spec.rb
new file mode 100644
index 00000000000..5d8edcf254c
--- /dev/null
+++ b/spec/graphql/types/commit_type_spec.rb
@@ -0,0 +1,11 @@
+# frozen_string_literal: true
+
+require 'spec_helper'
+
+describe GitlabSchema.types['Commit'] do
+ it { expect(described_class.graphql_name).to eq('Commit') }
+
+ it { expect(described_class).to require_graphql_authorizations(:download_code) }
+
+ it { expect(described_class).to have_graphql_fields(:id, :sha, :title, :description, :message, :authored_date, :author, :web_url, :latest_pipeline) }
+end
diff --git a/spec/graphql/types/tree/tree_type_spec.rb b/spec/graphql/types/tree/tree_type_spec.rb
index b9c5570115e..23779d75600 100644
--- a/spec/graphql/types/tree/tree_type_spec.rb
+++ b/spec/graphql/types/tree/tree_type_spec.rb
@@ -5,5 +5,5 @@ require 'spec_helper'
describe Types::Tree::TreeType do
it { expect(described_class.graphql_name).to eq('Tree') }
- it { expect(described_class).to have_graphql_fields(:trees, :submodules, :blobs) }
+ it { expect(described_class).to have_graphql_fields(:trees, :submodules, :blobs, :last_commit) }
end