diff options
Diffstat (limited to 'spec/models')
-rw-r--r-- | spec/models/ci/build_spec.rb | 2 | ||||
-rw-r--r-- | spec/models/clusters/kubernetes_namespace_spec.rb | 2 | ||||
-rw-r--r-- | spec/models/concerns/discussion_on_diff_spec.rb | 2 | ||||
-rw-r--r-- | spec/models/concerns/issuable_spec.rb | 2 | ||||
-rw-r--r-- | spec/models/external_issue_spec.rb | 2 | ||||
-rw-r--r-- | spec/models/label_note_spec.rb | 4 | ||||
-rw-r--r-- | spec/models/lfs_file_lock_spec.rb | 2 | ||||
-rw-r--r-- | spec/models/members/project_member_spec.rb | 2 | ||||
-rw-r--r-- | spec/models/merge_request_diff_commit_spec.rb | 2 | ||||
-rw-r--r-- | spec/models/merge_request_spec.rb | 24 | ||||
-rw-r--r-- | spec/models/project_services/drone_ci_service_spec.rb | 2 | ||||
-rw-r--r-- | spec/models/project_spec.rb | 2 | ||||
-rw-r--r-- | spec/models/resource_label_event_spec.rb | 2 |
13 files changed, 25 insertions, 25 deletions
diff --git a/spec/models/ci/build_spec.rb b/spec/models/ci/build_spec.rb index 60d89313f07..8ba33ff9c04 100644 --- a/spec/models/ci/build_spec.rb +++ b/spec/models/ci/build_spec.rb @@ -2480,7 +2480,7 @@ describe Ci::Build do context 'when container registry is enabled' do let(:container_registry_enabled) { true } let(:ci_registry) do - { key: 'CI_REGISTRY', value: 'registry.example.com', public: true } + { key: 'CI_REGISTRY', value: 'registry.example.com', public: true } end let(:ci_registry_image) do { key: 'CI_REGISTRY_IMAGE', value: project.container_registry_url, public: true } diff --git a/spec/models/clusters/kubernetes_namespace_spec.rb b/spec/models/clusters/kubernetes_namespace_spec.rb index 56c98d016c9..235e2ee4e69 100644 --- a/spec/models/clusters/kubernetes_namespace_spec.rb +++ b/spec/models/clusters/kubernetes_namespace_spec.rb @@ -28,7 +28,7 @@ RSpec.describe Clusters::KubernetesNamespace, type: :model do let(:cluster_project) { create(:cluster_project) } let(:kubernetes_namespace) { build(:cluster_kubernetes_namespace, namespace: 'my-namespace') } - subject { kubernetes_namespace } + subject { kubernetes_namespace } context 'when cluster is using the namespace' do before do diff --git a/spec/models/concerns/discussion_on_diff_spec.rb b/spec/models/concerns/discussion_on_diff_spec.rb index 4b16e6e3902..64bf04071e8 100644 --- a/spec/models/concerns/discussion_on_diff_spec.rb +++ b/spec/models/concerns/discussion_on_diff_spec.rb @@ -7,7 +7,7 @@ describe DiscussionOnDiff do let(:truncated_lines) { subject.truncated_diff_lines } context "when diff is greater than allowed number of truncated diff lines " do - it "returns fewer lines" do + it "returns fewer lines" do expect(subject.diff_lines.count).to be > DiffDiscussion::NUMBER_OF_TRUNCATED_DIFF_LINES expect(truncated_lines.count).to be <= DiffDiscussion::NUMBER_OF_TRUNCATED_DIFF_LINES diff --git a/spec/models/concerns/issuable_spec.rb b/spec/models/concerns/issuable_spec.rb index a4bf3e2350a..5753c646106 100644 --- a/spec/models/concerns/issuable_spec.rb +++ b/spec/models/concerns/issuable_spec.rb @@ -566,7 +566,7 @@ describe Issuable do end let(:merged_mr) { create(:merge_request, :merged, author: contributor, target_project: project, source_project: project) } - let(:open_mr) { create(:merge_request, author: first_time_contributor, target_project: project, source_project: project) } + let(:open_mr) { create(:merge_request, author: first_time_contributor, target_project: project, source_project: project) } let(:merged_mr_other_project) { create(:merge_request, :merged, author: first_time_contributor, target_project: other_project, source_project: other_project) } context "for merge requests" do diff --git a/spec/models/external_issue_spec.rb b/spec/models/external_issue_spec.rb index c8748daf46b..83ba22caa03 100644 --- a/spec/models/external_issue_spec.rb +++ b/spec/models/external_issue_spec.rb @@ -30,7 +30,7 @@ describe ExternalIssue do end context 'if issue id is a number' do - let(:issue) { described_class.new('1234', project) } + let(:issue) { described_class.new('1234', project) } it 'returns the issue ID prefixed by #' do expect(issue.reference_link_text).to eq '#1234' end diff --git a/spec/models/label_note_spec.rb b/spec/models/label_note_spec.rb index f69874d94aa..dd2c702a7a9 100644 --- a/spec/models/label_note_spec.rb +++ b/spec/models/label_note_spec.rb @@ -3,8 +3,8 @@ require 'spec_helper' describe LabelNote do - set(:project) { create(:project, :repository) } - set(:user) { create(:user) } + set(:project) { create(:project, :repository) } + set(:user) { create(:user) } set(:label) { create(:label, project: project) } set(:label2) { create(:label, project: project) } let(:resource_parent) { project } diff --git a/spec/models/lfs_file_lock_spec.rb b/spec/models/lfs_file_lock_spec.rb index e74f342d3eb..41ca1578b94 100644 --- a/spec/models/lfs_file_lock_spec.rb +++ b/spec/models/lfs_file_lock_spec.rb @@ -13,7 +13,7 @@ describe LfsFileLock do describe '#can_be_unlocked_by?' do let(:developer) { create(:user) } - let(:maintainer) { create(:user) } + let(:maintainer) { create(:user) } before do project = lfs_file_lock.project diff --git a/spec/models/members/project_member_spec.rb b/spec/models/members/project_member_spec.rb index 99d3ab41b97..36bfff2c339 100644 --- a/spec/models/members/project_member_spec.rb +++ b/spec/models/members/project_member_spec.rb @@ -39,7 +39,7 @@ describe ProjectMember do describe "#destroy" do let(:owner) { create(:project_member, access_level: ProjectMember::MAINTAINER) } let(:project) { owner.project } - let(:maintainer) { create(:project_member, project: project) } + let(:maintainer) { create(:project_member, project: project) } it "creates an expired event when left due to expiry" do expired = create(:project_member, project: project, expires_at: Time.now - 6.days) diff --git a/spec/models/merge_request_diff_commit_spec.rb b/spec/models/merge_request_diff_commit_spec.rb index 8c01a7ac18f..10487190a44 100644 --- a/spec/models/merge_request_diff_commit_spec.rb +++ b/spec/models/merge_request_diff_commit_spec.rb @@ -16,7 +16,7 @@ describe MergeRequestDiffCommit do end describe '.create_bulk' do - let(:sha_attribute) { Gitlab::Database::ShaAttribute.new } + let(:sha_attribute) { Gitlab::Database::ShaAttribute.new } let(:merge_request_diff_id) { merge_request.merge_request_diff.id } let(:commits) do [ diff --git a/spec/models/merge_request_spec.rb b/spec/models/merge_request_spec.rb index bfc9035cb56..b62f973ad1e 100644 --- a/spec/models/merge_request_spec.rb +++ b/spec/models/merge_request_spec.rb @@ -1032,7 +1032,7 @@ describe MergeRequest do end describe '#diverged_commits_count' do - let(:project) { create(:project, :repository) } + let(:project) { create(:project, :repository) } let(:forked_project) { fork_project(project, nil, repository: true) } context 'when the target branch does not exist anymore' do @@ -2298,9 +2298,9 @@ describe MergeRequest do end describe "#source_project_missing?" do - let(:project) { create(:project) } + let(:project) { create(:project) } let(:forked_project) { fork_project(project) } - let(:user) { create(:user) } + let(:user) { create(:user) } let(:unlink_project) { Projects::UnlinkForkService.new(forked_project, user) } context "when the fork exists" do @@ -2370,9 +2370,9 @@ describe MergeRequest do end describe "#closed_without_fork?" do - let(:project) { create(:project) } + let(:project) { create(:project) } let(:forked_project) { fork_project(project) } - let(:user) { create(:user) } + let(:user) { create(:user) } let(:unlink_project) { Projects::UnlinkForkService.new(forked_project, user) } context "when the merge request is closed" do @@ -2494,7 +2494,7 @@ describe MergeRequest do expect(merge_request.mergeable_with_quick_action?(user, last_diff_sha: mr_sha)).to be_falsey end - context 'closed MR' do + context 'closed MR' do before do merge_request.update_attribute(:state, :closed) end @@ -2504,7 +2504,7 @@ describe MergeRequest do end end - context 'MR with WIP' do + context 'MR with WIP' do before do merge_request.update_attribute(:title, 'WIP: some MR') end @@ -2514,19 +2514,19 @@ describe MergeRequest do end end - context 'sha differs from the MR diff_head_sha' do + context 'sha differs from the MR diff_head_sha' do it 'is not mergeable' do expect(merge_request.mergeable_with_quick_action?(developer, last_diff_sha: 'some other sha')).to be_falsey end end - context 'sha is not provided' do + context 'sha is not provided' do it 'is not mergeable' do expect(merge_request.mergeable_with_quick_action?(developer)).to be_falsey end end - context 'with pipeline ok' do + context 'with pipeline ok' do before do create_pipeline(:success) end @@ -2536,7 +2536,7 @@ describe MergeRequest do end end - context 'with failing pipeline' do + context 'with failing pipeline' do before do create_pipeline(:failed) end @@ -2546,7 +2546,7 @@ describe MergeRequest do end end - context 'with running pipeline' do + context 'with running pipeline' do before do create_pipeline(:running) end diff --git a/spec/models/project_services/drone_ci_service_spec.rb b/spec/models/project_services/drone_ci_service_spec.rb index d8972aff407..26597d9b83c 100644 --- a/spec/models/project_services/drone_ci_service_spec.rb +++ b/spec/models/project_services/drone_ci_service_spec.rb @@ -117,7 +117,7 @@ describe DroneCiService, :use_clean_rails_memory_store_caching do describe "execute" do include_context :drone_ci_service - let(:user) { create(:user, username: 'username') } + let(:user) { create(:user, username: 'username') } let(:push_sample_data) do Gitlab::DataBuilder::Push.build_sample(project, user) end diff --git a/spec/models/project_spec.rb b/spec/models/project_spec.rb index 7a8dc59039e..437f0066450 100644 --- a/spec/models/project_spec.rb +++ b/spec/models/project_spec.rb @@ -3926,7 +3926,7 @@ describe Project do describe '#badges' do let(:project_group) { create(:group) } - let(:project) { create(:project, path: 'avatar', namespace: project_group) } + let(:project) { create(:project, path: 'avatar', namespace: project_group) } before do create_list(:project_badge, 2, project: project) diff --git a/spec/models/resource_label_event_spec.rb b/spec/models/resource_label_event_spec.rb index e7e3f7376e6..3797960ac3d 100644 --- a/spec/models/resource_label_event_spec.rb +++ b/spec/models/resource_label_event_spec.rb @@ -88,7 +88,7 @@ RSpec.describe ResourceLabelEvent, type: :model do end it 'returns false if label and reference are set' do - subject.attributes = { reference: 'whatever', cached_markdown_version: CacheMarkdownField::CACHE_COMMONMARK_VERSION } + subject.attributes = { reference: 'whatever', cached_markdown_version: CacheMarkdownField::CACHE_COMMONMARK_VERSION } expect(subject.outdated_markdown?).to be false end |