Remove obsolete tests

pull/7891/head
Henriette Dinger 5 years ago committed by Oliver Günther
parent a5811fc134
commit d680b329c5
No known key found for this signature in database
GPG Key ID: A3A8BDAD7C0C552C
  1. 10
      modules/grids/spec/lib/api/v3/grids/schemas/grid_schema_representer_spec.rb
  2. 4
      spec/lib/api/v3/memberships/schemas/membership_schema_representer_spec.rb
  3. 16
      spec/lib/api/v3/projects/schemas/project_schema_representer_spec.rb
  4. 6
      spec/lib/api/v3/queries/schemas/query_filter_instance_schema_representer_spec.rb
  5. 40
      spec/lib/api/v3/queries/schemas/query_schema_representer_spec.rb
  6. 6
      spec/lib/api/v3/support/api_v3_filter_dependency.rb
  7. 7
      spec/lib/api/v3/support/schema_examples.rb
  8. 14
      spec/lib/api/v3/versions/schemas/version_schema_representer_spec.rb

@ -94,8 +94,6 @@ describe ::API::V3::Grids::Schemas::GridSchemaRepresenter do
let(:required) { true }
let(:writable) { false }
end
it_behaves_like 'has no visibility property'
end
describe 'rowCount' do
@ -107,8 +105,6 @@ describe ::API::V3::Grids::Schemas::GridSchemaRepresenter do
let(:required) { true }
let(:writable) { true }
end
it_behaves_like 'has no visibility property'
end
describe 'columnCount' do
@ -120,8 +116,6 @@ describe ::API::V3::Grids::Schemas::GridSchemaRepresenter do
let(:required) { true }
let(:writable) { true }
end
it_behaves_like 'has no visibility property'
end
describe 'createdAt' do
@ -133,8 +127,6 @@ describe ::API::V3::Grids::Schemas::GridSchemaRepresenter do
let(:required) { true }
let(:writable) { false }
end
it_behaves_like 'has no visibility property'
end
describe 'updatedAt' do
@ -146,8 +138,6 @@ describe ::API::V3::Grids::Schemas::GridSchemaRepresenter do
let(:required) { true }
let(:writable) { false }
end
it_behaves_like 'has no visibility property'
end
describe 'widgets' do

@ -96,8 +96,6 @@ describe ::API::V3::Memberships::Schemas::MembershipSchemaRepresenter do
let(:required) { true }
let(:writable) { false }
end
it_behaves_like 'has no visibility property'
end
describe 'createdAt' do
@ -109,8 +107,6 @@ describe ::API::V3::Memberships::Schemas::MembershipSchemaRepresenter do
let(:required) { true }
let(:writable) { false }
end
it_behaves_like 'has no visibility property'
end
describe 'project' do

@ -100,8 +100,6 @@ describe ::API::V3::Projects::Schemas::ProjectSchemaRepresenter do
let(:required) { true }
let(:writable) { false }
end
it_behaves_like 'has no visibility property'
end
describe 'name' do
@ -118,8 +116,6 @@ describe ::API::V3::Projects::Schemas::ProjectSchemaRepresenter do
let(:min_length) { 1 }
let(:max_length) { 255 }
end
it_behaves_like 'has no visibility property'
end
describe 'identifier' do
@ -136,8 +132,6 @@ describe ::API::V3::Projects::Schemas::ProjectSchemaRepresenter do
let(:min_length) { 1 }
let(:max_length) { 100 }
end
it_behaves_like 'has no visibility property'
end
describe 'description' do
@ -149,8 +143,6 @@ describe ::API::V3::Projects::Schemas::ProjectSchemaRepresenter do
let(:required) { false }
let(:writable) { true }
end
it_behaves_like 'has no visibility property'
end
describe 'public' do
@ -162,8 +154,6 @@ describe ::API::V3::Projects::Schemas::ProjectSchemaRepresenter do
let(:required) { true }
let(:writable) { true }
end
it_behaves_like 'has no visibility property'
end
describe 'active' do
@ -175,8 +165,6 @@ describe ::API::V3::Projects::Schemas::ProjectSchemaRepresenter do
let(:required) { true }
let(:writable) { true }
end
it_behaves_like 'has no visibility property'
end
describe 'statusExplanation' do
@ -222,8 +210,6 @@ describe ::API::V3::Projects::Schemas::ProjectSchemaRepresenter do
let(:required) { true }
let(:writable) { false }
end
it_behaves_like 'has no visibility property'
end
describe 'updatedAt' do
@ -235,8 +221,6 @@ describe ::API::V3::Projects::Schemas::ProjectSchemaRepresenter do
let(:required) { true }
let(:writable) { false }
end
it_behaves_like 'has no visibility property'
end
describe 'int custom field' do

@ -105,8 +105,6 @@ describe ::API::V3::Queries::Schemas::QueryFilterInstanceSchemaRepresenter, clea
let(:writable) { false }
let(:has_default) { true }
end
it_behaves_like 'has no visibility property'
end
describe 'filter' do
@ -119,8 +117,6 @@ describe ::API::V3::Queries::Schemas::QueryFilterInstanceSchemaRepresenter, clea
let(:writable) { true }
end
it_behaves_like 'has no visibility property'
it_behaves_like 'does not link to allowed values'
context 'when embedding' do
@ -150,8 +146,6 @@ describe ::API::V3::Queries::Schemas::QueryFilterInstanceSchemaRepresenter, clea
let(:writable) { true }
end
it_behaves_like 'has no visibility property'
it_behaves_like 'does not link to allowed values'
context 'when embedding' do

@ -112,8 +112,6 @@ describe ::API::V3::Queries::Schemas::QuerySchemaRepresenter do
let(:required) { true }
let(:writable) { false }
end
it_behaves_like 'has no visibility property'
end
describe 'name' do
@ -130,8 +128,6 @@ describe ::API::V3::Queries::Schemas::QuerySchemaRepresenter do
let(:min_length) { 1 }
let(:max_length) { 255 }
end
it_behaves_like 'has no visibility property'
end
describe 'createdAt' do
@ -143,8 +139,6 @@ describe ::API::V3::Queries::Schemas::QuerySchemaRepresenter do
let(:required) { true }
let(:writable) { false }
end
it_behaves_like 'has no visibility property'
end
describe 'updatedAt' do
@ -156,8 +150,6 @@ describe ::API::V3::Queries::Schemas::QuerySchemaRepresenter do
let(:required) { true }
let(:writable) { false }
end
it_behaves_like 'has no visibility property'
end
describe 'user' do
@ -170,8 +162,6 @@ describe ::API::V3::Queries::Schemas::QuerySchemaRepresenter do
let(:writable) { false }
let(:has_default) { true }
end
it_behaves_like 'has no visibility property'
end
describe 'project' do
@ -184,8 +174,6 @@ describe ::API::V3::Queries::Schemas::QuerySchemaRepresenter do
let(:writable) { true }
end
it_behaves_like 'has no visibility property'
it_behaves_like 'does not link to allowed values'
context 'when embedding' do
@ -208,8 +196,6 @@ describe ::API::V3::Queries::Schemas::QuerySchemaRepresenter do
let(:has_default) { true }
end
it_behaves_like 'has no visibility property'
context 'when having the :manage_public_queries permission' do
before do
allow(user)
@ -248,8 +234,6 @@ describe ::API::V3::Queries::Schemas::QuerySchemaRepresenter do
let(:writable) { true }
let(:has_default) { true }
end
it_behaves_like 'has no visibility property'
end
describe 'timelineVisible' do
@ -262,8 +246,6 @@ describe ::API::V3::Queries::Schemas::QuerySchemaRepresenter do
let(:writable) { true }
let(:has_default) { true }
end
it_behaves_like 'has no visibility property'
end
describe 'timelineZoomLevel' do
@ -276,8 +258,6 @@ describe ::API::V3::Queries::Schemas::QuerySchemaRepresenter do
let(:writable) { true }
let(:has_default) { true }
end
it_behaves_like 'has no visibility property'
end
describe 'timelineLabels' do
@ -290,8 +270,6 @@ describe ::API::V3::Queries::Schemas::QuerySchemaRepresenter do
let(:writable) { true }
let(:has_default) { true }
end
it_behaves_like 'has no visibility property'
end
describe 'show hierarchies' do
@ -304,8 +282,6 @@ describe ::API::V3::Queries::Schemas::QuerySchemaRepresenter do
let(:writable) { true }
let(:has_default) { true }
end
it_behaves_like 'has no visibility property'
end
describe 'starred' do
@ -318,8 +294,6 @@ describe ::API::V3::Queries::Schemas::QuerySchemaRepresenter do
let(:writable) { false }
let(:has_default) { true }
end
it_behaves_like 'has no visibility property'
end
describe 'highlighting_mode' do
@ -332,8 +306,6 @@ describe ::API::V3::Queries::Schemas::QuerySchemaRepresenter do
let(:writable) { true }
let(:has_default) { true }
end
it_behaves_like 'has no visibility property'
end
describe 'display_representation' do
@ -346,8 +318,6 @@ describe ::API::V3::Queries::Schemas::QuerySchemaRepresenter do
let(:writable) { true }
let(:has_default) { true }
end
it_behaves_like 'has no visibility property'
end
describe 'columns' do
@ -361,8 +331,6 @@ describe ::API::V3::Queries::Schemas::QuerySchemaRepresenter do
let(:has_default) { true }
end
it_behaves_like 'has no visibility property'
it_behaves_like 'does not link to allowed values'
context 'when embedding' do
@ -441,8 +409,6 @@ describe ::API::V3::Queries::Schemas::QuerySchemaRepresenter do
let(:has_default) { true }
end
it_behaves_like 'has no visibility property'
it_behaves_like 'does not link to allowed values'
context 'when global query' do
@ -477,8 +443,6 @@ describe ::API::V3::Queries::Schemas::QuerySchemaRepresenter do
let(:writable) { true }
end
it_behaves_like 'has no visibility property'
it_behaves_like 'does not link to allowed values'
context 'when embedding' do
@ -511,8 +475,6 @@ describe ::API::V3::Queries::Schemas::QuerySchemaRepresenter do
let(:has_default) { true }
end
it_behaves_like 'has no visibility property'
it_behaves_like 'does not link to allowed values'
context 'when embedding' do
@ -553,8 +515,6 @@ describe ::API::V3::Queries::Schemas::QuerySchemaRepresenter do
let(:required) { false }
let(:writable) { false }
end
it_behaves_like 'has no visibility property'
end
end

@ -34,8 +34,6 @@ shared_examples_for 'filter dependency' do
let(:has_default) { false }
end
it_behaves_like 'has no visibility property'
it_behaves_like 'does not link to allowed values'
context 'when embedding' do
@ -53,8 +51,6 @@ shared_examples_for 'filter dependency with allowed link' do
let(:has_default) { false }
end
it_behaves_like 'has no visibility property'
it_behaves_like 'does not link to allowed values'
context 'when embedding' do
@ -72,8 +68,6 @@ shared_examples_for 'filter dependency with allowed value link collection' do
let(:has_default) { false }
end
it_behaves_like 'has no visibility property'
it_behaves_like 'does not link to allowed values'
context 'when embedding' do

@ -86,13 +86,6 @@ shared_examples_for 'indicates length requirements' do
end
end
shared_examples_for 'has no visibility property' do
it 'has no path' do
is_expected
.not_to have_json_path("#{path}/visibility")
end
end
shared_examples_for 'links to allowed values directly' do
it 'has the expected number of links' do
is_expected.to have_json_size(hrefs.size).at_path("#{path}/_links/allowedValues")

@ -98,8 +98,6 @@ describe ::API::V3::Versions::Schemas::VersionSchemaRepresenter do
let(:required) { true }
let(:writable) { false }
end
it_behaves_like 'has no visibility property'
end
describe 'createdAt' do
@ -111,8 +109,6 @@ describe ::API::V3::Versions::Schemas::VersionSchemaRepresenter do
let(:required) { true }
let(:writable) { false }
end
it_behaves_like 'has no visibility property'
end
describe 'updatedAt' do
@ -124,8 +120,6 @@ describe ::API::V3::Versions::Schemas::VersionSchemaRepresenter do
let(:required) { true }
let(:writable) { false }
end
it_behaves_like 'has no visibility property'
end
describe 'name' do
@ -142,8 +136,6 @@ describe ::API::V3::Versions::Schemas::VersionSchemaRepresenter do
let(:min_length) { 1 }
let(:max_length) { 60 }
end
it_behaves_like 'has no visibility property'
end
describe 'description' do
@ -155,8 +147,6 @@ describe ::API::V3::Versions::Schemas::VersionSchemaRepresenter do
let(:required) { false }
let(:writable) { true }
end
it_behaves_like 'has no visibility property'
end
describe 'int custom field' do
@ -179,8 +169,6 @@ describe ::API::V3::Versions::Schemas::VersionSchemaRepresenter do
let(:required) { false }
let(:writable) { true }
end
it_behaves_like 'has no visibility property'
end
describe 'endDate' do
@ -192,8 +180,6 @@ describe ::API::V3::Versions::Schemas::VersionSchemaRepresenter do
let(:required) { false }
let(:writable) { true }
end
it_behaves_like 'has no visibility property'
end
describe 'definingProject' do

Loading…
Cancel
Save