mirror of
https://github.com/opf/openproject.git
synced 2026-06-14 03:30:14 +00:00
Fix typos in user facing and non-user facing code (#9497)
* Fix typos in user facing and non-user facing code Found via `codespell -q 3 -S ./config/locales -L ba,nd,parms,sur,varius` * Fix strings in specs
This commit is contained in:
@@ -94,7 +94,7 @@ class UserPassword < ApplicationRecord
|
||||
protected
|
||||
|
||||
# Save hashed_password from the initially passed plain password
|
||||
# if it is is set.
|
||||
# if it's set.
|
||||
def salt_and_hash_password!
|
||||
return if plain_password.nil?
|
||||
|
||||
|
||||
@@ -230,7 +230,7 @@ In order to turn the JSON properties from `_embedded` and `_links` into writable
|
||||
|
||||
## 🔗 Code references
|
||||
|
||||
- [`HALResourceService`](https://github.com/opf/openproject/tree/dev/frontend/src/app/modules/hal/services/hal-resource.service.ts) for loading and and turning JSON responses into HAL resource classes
|
||||
- [`HALResourceService`](https://github.com/opf/openproject/tree/dev/frontend/src/app/modules/hal/services/hal-resource.service.ts) for loading and turning JSON responses into HAL resource classes
|
||||
- [`halResource.config.ts`](https://github.com/opf/openproject/tree/dev/frontend/src/app/modules/hal/services/hal-resource.config.ts) for identifying what types in the JSON response and its members/links are being turned into which classes.
|
||||
- [`HalResource`](https://github.com/opf/openproject/tree/dev/frontend/src/app/modules/hal/resources/hal-resource.ts) the base HAL resource class
|
||||
- [`HAL resource builder`](https://github.com/opf/openproject/tree/dev/frontend/src/app/modules/hal/helpers/hal-resource-builder.ts) used for wiring up the links and embedded JSON properties into members of the HAL resource classes
|
||||
|
||||
@@ -166,7 +166,7 @@ sub _handle_request {
|
||||
|
||||
return {
|
||||
success => JSON::true,
|
||||
message => "The action has completed sucessfully.",
|
||||
message => "The action has completed successfully.",
|
||||
repository => $target,
|
||||
path => $target,
|
||||
# This is only useful in the packager context
|
||||
|
||||
@@ -165,6 +165,7 @@ class RedmineMailHandler
|
||||
debug "Response received: #{response.code}"
|
||||
|
||||
case response.code.to_i
|
||||
debug "Processed successfully"
|
||||
when 403
|
||||
warn "Request was denied by your Redmine server. " +
|
||||
"Make sure that 'WS for incoming emails' is enabled in application settings and that you provided the correct API key."
|
||||
@@ -180,7 +181,7 @@ class RedmineMailHandler
|
||||
warn "Failed to contact your Redmine server (#{response.code})."
|
||||
75
|
||||
when 201
|
||||
debug "Proccessed successfully"
|
||||
debug "Processed successfully"
|
||||
0
|
||||
else
|
||||
1
|
||||
|
||||
+2
-2
@@ -30,7 +30,7 @@
|
||||
|
||||
# Root class of the API
|
||||
# This is the place for all API wide configuration, helper methods, exceptions
|
||||
# rescuing, mounting of differnet API versions etc.
|
||||
# rescuing, mounting of different API versions etc.
|
||||
|
||||
require 'open_project/authentication'
|
||||
|
||||
@@ -78,7 +78,7 @@ module API
|
||||
end
|
||||
|
||||
# Global helper to set allowed content_types
|
||||
# This may be overriden when multipart is allowed (file uploads)
|
||||
# This may be overridden when multipart is allowed (file uploads)
|
||||
def allowed_content_types
|
||||
%w(application/json application/hal+json)
|
||||
end
|
||||
|
||||
@@ -32,7 +32,7 @@ module API
|
||||
module Utilities
|
||||
# Since APIv3 uses different names for some properties, there is sometimes the need to convert
|
||||
# names between the "old" Rails/ActiveRecord world of names and the "new" APIv3 world of names.
|
||||
# This class provides methods to cope with the neccessary name conversions
|
||||
# This class provides methods to cope with the necessary name conversions
|
||||
# There are multiple reasons for naming differences:
|
||||
# - APIv3 is using camelCase as opposed to snake_case
|
||||
# - APIv3 defines some properties as a different type, which requires a name change
|
||||
@@ -87,7 +87,7 @@ module API
|
||||
|
||||
private
|
||||
|
||||
# Unifies different attributes refering to the same thing via a foreign key
|
||||
# Unifies different attributes referring to the same thing via a foreign key
|
||||
# e.g. status_id -> status
|
||||
def normalize_foreign_key_name(attribute)
|
||||
attribute.to_s.sub(/(.+)_id\z/, '\1')
|
||||
|
||||
@@ -34,7 +34,7 @@ module API
|
||||
module AttachmentsByContainerAPI
|
||||
module Helpers
|
||||
# Global helper to set allowed content_types
|
||||
# This may be overriden when multipart is allowed (file uploads)
|
||||
# This may be overridden when multipart is allowed (file uploads)
|
||||
def allowed_content_types
|
||||
if post_request?
|
||||
%w(multipart/form-data)
|
||||
|
||||
@@ -54,12 +54,12 @@ module API
|
||||
# In order to optimize performance we
|
||||
# * override paged_models so that only the id is fetched from the
|
||||
# scope (typically a query with a couple of includes for e.g.
|
||||
# filtering), circumventing AR instantiation alltogether
|
||||
# filtering), circumventing AR instantiation altogether
|
||||
# * use the ids to fetch the actual work packages with all the fields
|
||||
# necessary for rendering the work packages in _elements
|
||||
#
|
||||
# This results in the weird flow where the scope is passed to super (models variable),
|
||||
# which calls the overriden paged_models method fetching the ids. In order to have
|
||||
# which calls the overridden paged_models method fetching the ids. In order to have
|
||||
# real AR objects again, we finally get the work packages we actually want to have
|
||||
# and set those to be the represented collection.
|
||||
# A potential ordering is reapplied to the work package collection in ruby.
|
||||
|
||||
@@ -35,7 +35,7 @@ class InstanceFinder
|
||||
|
||||
def self.find(model, identifier)
|
||||
if @model_method_map[model].nil?
|
||||
raise "#{model} is not registerd with InstanceFinder"
|
||||
raise "#{model} is not registered with InstanceFinder"
|
||||
end
|
||||
|
||||
@model_method_map[model].call(identifier)
|
||||
|
||||
@@ -53,7 +53,7 @@ module OpenProject
|
||||
end
|
||||
|
||||
##
|
||||
# Overriden by descendants when
|
||||
# Overridden by descendants when
|
||||
# they are able to retrieve current
|
||||
# storage usage.
|
||||
def storage_available?
|
||||
|
||||
@@ -77,7 +77,7 @@ module OpenProject
|
||||
# Retrieve the local FS path
|
||||
# of this repository.
|
||||
#
|
||||
# Overriden by some vendors, as not
|
||||
# Overridden by some vendors, as not
|
||||
# all vendors have a path root_url.
|
||||
# (e.g., subversion uses file:// URLs)
|
||||
def local_repository_path
|
||||
|
||||
@@ -176,7 +176,7 @@ module OpenProject::TextFormatting::Formats
|
||||
end
|
||||
|
||||
if markdowns_in_groups.length != orig_values.length
|
||||
# Error handling: Some textile seems to be misformed e.g. <pre>something</pre (without closing >).
|
||||
# Error handling: Some textile seems to be malformed e.g. <pre>something</pre (without closing >).
|
||||
# In such cases, handle texts individually to avoid the error affecting other texts
|
||||
progress = ProgressBar.create(title: "Converting items individually due to pandoc mismatch", total: orig_values.length)
|
||||
markdowns = old_values.each_with_index.map do |old_value, index|
|
||||
@@ -344,7 +344,7 @@ module OpenProject::TextFormatting::Formats
|
||||
end
|
||||
|
||||
def cleanup_after_pandoc(markdown)
|
||||
# Remove the \ pandoc puts before * and > at begining of lines
|
||||
# Remove the \ pandoc puts before * and > at beginning of lines
|
||||
markdown.gsub!(/^((\\[*>])+)/) { $1.gsub("\\", "") }
|
||||
|
||||
# Add a blank line before lists
|
||||
|
||||
@@ -40,7 +40,7 @@ module OpenProject
|
||||
|
||||
class << self
|
||||
# Used by semver to define the special version (if any).
|
||||
# A special version "satify but have a lower precedence than the associated
|
||||
# A special version "satisfy but have a lower precedence than the associated
|
||||
# normal version". So 2.0.0RC1 would be part of the 2.0.0 series but
|
||||
# be considered to be an older version.
|
||||
#
|
||||
|
||||
@@ -85,7 +85,7 @@ class Redmine::MenuManager::TreeNode < Tree::TreeNode
|
||||
child
|
||||
end
|
||||
|
||||
# Wrapp remove! making sure to decrement the last_items counter if
|
||||
# Wrap remove! making sure to decrement the last_items counter if
|
||||
# the removed child was a last item
|
||||
def remove!(child)
|
||||
@last_items_count -= +1 if child && child.last
|
||||
|
||||
@@ -45,7 +45,7 @@ module Redmine
|
||||
if line.respond_to?(:force_encoding)
|
||||
line_encoding = line.encoding
|
||||
# TODO: UTF-16 and Japanese CP932 which is incompatible with ASCII
|
||||
# In Japan, diffrence between file path encoding
|
||||
# In Japan, difference between file path encoding
|
||||
# and file contents encoding is popular.
|
||||
line.force_encoding('ASCII-8BIT')
|
||||
end
|
||||
|
||||
@@ -39,7 +39,7 @@ Rake::Task['assets:precompile']
|
||||
namespace :assets do
|
||||
# In this task, set prerequisites for the assets:precompile task
|
||||
task compile_environment: :prepare_op do
|
||||
# Turn the yarn:install taks into a noop.
|
||||
# Turn the yarn:install task into a noop.
|
||||
Rake::Task['yarn:install']
|
||||
.clear
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ end
|
||||
|
||||
require 'parallel_tests/tasks'
|
||||
# Remove task added by parallel_tests as it conflicts with our own.
|
||||
# Having both will lead to both being executred.
|
||||
# Having both will lead to both being executed.
|
||||
Rake::Task["parallel:features"].clear if Rake::Task.task_defined?("parallel:features")
|
||||
|
||||
def check_for_pending_migrations
|
||||
|
||||
@@ -38,7 +38,7 @@ module OmniAuth
|
||||
|
||||
##
|
||||
# Tries to match the request path of the current request with one of the registered providers.
|
||||
# If a match is found the strategy is intialised with that provider to handle the request.
|
||||
# If a match is found the strategy is initialised with that provider to handle the request.
|
||||
def match_provider!
|
||||
return false unless providers
|
||||
|
||||
|
||||
@@ -679,23 +679,23 @@ en:
|
||||
- :to: Project preperation
|
||||
:type: follows
|
||||
- :start: 54
|
||||
:subject: Creating inital BIM model
|
||||
:subject: Creating initial BIM model
|
||||
:description: This type is hierarchicaly a parent of the types "Clash"
|
||||
and "Request", thus represents a general note.
|
||||
:status: default_status_new
|
||||
:type: default_type_phase
|
||||
:children:
|
||||
- :start: 54
|
||||
:subject: Modelling inital BIM model
|
||||
:subject: Modelling initial BIM model
|
||||
:description: |-
|
||||
# Goal
|
||||
|
||||
* Modelling the inital BIM model
|
||||
* Modelling the initial BIM model
|
||||
* Creating a BIM model for the whole project team
|
||||
|
||||
# Description
|
||||
|
||||
* According to the gathered data from the customer, the inital model will be modelled
|
||||
* According to the gathered data from the customer, the initial model will be modelled
|
||||
* The model shall be modelled according to the LOD Matrices and contain the information needed
|
||||
* ...
|
||||
:status: default_status_new
|
||||
@@ -721,10 +721,10 @@ en:
|
||||
:assigned_to: Lead BIM Coordinators
|
||||
:duration: 2
|
||||
:relations:
|
||||
- :to: Modelling inital BIM model
|
||||
- :to: Modelling initial BIM model
|
||||
:type: follows
|
||||
- :start: 65
|
||||
:subject: Submitting inital BIM model
|
||||
:subject: Submitting initial BIM model
|
||||
:description: This type is hierarchicaly a parent of the types "Clash"
|
||||
and "Request", thus represents a general note.
|
||||
:status: default_status_new
|
||||
@@ -763,7 +763,7 @@ en:
|
||||
:assigned_to: BIM Modellers
|
||||
:duration: 0
|
||||
:relations:
|
||||
- :to: Submitting inital BIM model
|
||||
- :to: Submitting initial BIM model
|
||||
:type: follows
|
||||
- :start: 67
|
||||
:subject: Modelling the BIM model
|
||||
@@ -816,7 +816,7 @@ en:
|
||||
:assigned_to: BIM Coordinators
|
||||
:duration: 10
|
||||
:relations:
|
||||
- :to: Submitting inital BIM model
|
||||
- :to: Submitting initial BIM model
|
||||
:type: follows
|
||||
- :start: 77
|
||||
:subject: Coordination, first cycle
|
||||
|
||||
@@ -38,7 +38,7 @@ module API
|
||||
namespace 'bcf_xml' do
|
||||
helpers do
|
||||
# Global helper to set allowed content_types
|
||||
# This may be overriden when multipart is allowed (file uploads)
|
||||
# This may be overridden when multipart is allowed (file uploads)
|
||||
def allowed_content_types
|
||||
if post_request?
|
||||
%w(multipart/form-data)
|
||||
|
||||
@@ -728,7 +728,7 @@ describe Bim::Bcf::Viewpoints::CreateContract do
|
||||
end
|
||||
end
|
||||
|
||||
context 'with a component of the selection property having an unkonwn property' do
|
||||
context 'with a component of the selection property having an unknown property' do
|
||||
let(:viewpoint_json_viewpoint) do
|
||||
valid_json['components'][:selection][1]['superfluous'] = "sdsdsf"
|
||||
valid_json
|
||||
|
||||
@@ -36,7 +36,7 @@ FactoryBot.define do
|
||||
if file.readable?
|
||||
JSON.parse(file.read)
|
||||
else
|
||||
warn "Viewpoint name #{viewpoint_name} doesnt map to a viewpoint fixture"
|
||||
warn "Viewpoint name #{viewpoint_name} doesn't map to a viewpoint fixture"
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ FactoryBot.define do
|
||||
if file.readable?
|
||||
file.read
|
||||
else
|
||||
warn "Viewpoint name #{viewpoint_name} doesnt map to a viewpoint fixture"
|
||||
warn "Viewpoint name #{viewpoint_name} doesn't map to a viewpoint fixture"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -146,7 +146,7 @@ describe 'BIM navigation spec',
|
||||
end
|
||||
|
||||
it 'after going to the full view with a selected tab,
|
||||
the same tab shoud be opened in full screen view and after going back to details view(see #33747)' do
|
||||
the same tab should be opened in full screen view and after going back to details view(see #33747)' do
|
||||
card_view.open_full_screen_by_details(work_package)
|
||||
|
||||
details_view.ensure_page_loaded
|
||||
|
||||
@@ -65,7 +65,7 @@ describe 'model management',
|
||||
index_page.visit!
|
||||
end
|
||||
|
||||
it 'I can perfom all actions on the models' do
|
||||
it 'I can perform all actions on the models' do
|
||||
index_page.model_listed true, model.title
|
||||
index_page.add_model_allowed true
|
||||
index_page.edit_model_allowed model.title, true
|
||||
|
||||
@@ -170,7 +170,7 @@ end
|
||||
shared_examples 'matches the JSON counterpart' do
|
||||
it 'matches the JSON viewpoint counterpart' do
|
||||
path = OpenProject::Bim::Engine.root.join("spec/fixtures/viewpoints/#{xml_viewpoint.viewpoint_name}.json")
|
||||
raise "Expected #{path} to be readable for JSON comparsion" unless path.readable?
|
||||
raise "Expected #{path} to be readable for JSON comparison" unless path.readable?
|
||||
|
||||
json = path.read
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@ class DefaultHourlyRate < Rate
|
||||
end
|
||||
|
||||
def rate_updated
|
||||
# FIXME: This might be extremly slow. Consider using an implementation like in HourlyRateObserver
|
||||
# FIXME: This might be extremely slow. Consider using an implementation like in HourlyRateObserver
|
||||
unless valid_from_changed?
|
||||
# We have not moved a rate, maybe just changed the rate value
|
||||
|
||||
|
||||
@@ -48,15 +48,15 @@ class WorkPackage
|
||||
#
|
||||
# @return [Class] Class of the model the costs are based on, e.g. CostEntry or TimeEntry.
|
||||
def costs_model
|
||||
raise NotImplementedError, "subclass responsiblity"
|
||||
raise NotImplementedError, "subclass responsibility"
|
||||
end
|
||||
|
||||
def costs_sum_alias
|
||||
raise NotImplementedError, "subclass responsiblity"
|
||||
raise NotImplementedError, "subclass responsibility"
|
||||
end
|
||||
|
||||
def subselect_alias
|
||||
raise NotImplementedError, "subclass responsiblity"
|
||||
raise NotImplementedError, "subclass responsibility"
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
@@ -688,7 +688,7 @@ describe CostlogController, type: :controller do
|
||||
|
||||
describe "WHEN the user is allowed to update own cost_entries and not all
|
||||
WHEN updating foreign cost_entry
|
||||
WHEN updating someting" do
|
||||
WHEN updating something" do
|
||||
let(:user3) { FactoryBot.create(:user) }
|
||||
|
||||
before do
|
||||
|
||||
@@ -30,7 +30,7 @@ require 'spec_helper'
|
||||
|
||||
describe API::V3::CostsApiUserPermissionCheck do
|
||||
class CostsApiUserPermissionCheckTestClass
|
||||
# mimick representer
|
||||
# mimic representer
|
||||
def view_time_entries_allowed?
|
||||
current_user_allowed_to(:view_time_entries, context: represented.project) ||
|
||||
current_user_allowed_to(:view_own_time_entries, context: represented.project)
|
||||
|
||||
@@ -86,7 +86,7 @@ describe ::API::V3::WorkPackages::WorkPackageRepresenter do
|
||||
end
|
||||
|
||||
describe 'work_package' do
|
||||
# specifiying as it used to be different
|
||||
# specifying as it used to be different
|
||||
it { is_expected.to have_json_path('spentTime') }
|
||||
|
||||
it { is_expected.not_to have_json_path('spentHours') }
|
||||
|
||||
@@ -257,7 +257,7 @@ describe CostEntry, type: :model do
|
||||
end
|
||||
|
||||
describe '#real_costs' do
|
||||
describe 'WHEN overrridden cost are set' do
|
||||
describe 'WHEN overridden cost are set' do
|
||||
let(:value) { rand(500) }
|
||||
|
||||
before do
|
||||
|
||||
@@ -269,7 +269,7 @@ describe TimeEntry, type: :model do
|
||||
expect(@default_example.costs).to eq(default_hourly_five.rate)
|
||||
end
|
||||
|
||||
it 'shoud be able to switch between default hourly rate and hourly rate' do
|
||||
it 'should be able to switch between default hourly rate and hourly rate' do
|
||||
@default_example.user = user2
|
||||
@default_example.rate = default_hourly_one
|
||||
@default_example.save!
|
||||
|
||||
@@ -54,7 +54,7 @@ describe 'Assigned to me embedded query on my page', type: :feature, js: true do
|
||||
let!(:assigned_to_other_work_package) do
|
||||
FactoryBot.create :work_package,
|
||||
project: project,
|
||||
subject: 'Not assigend to me',
|
||||
subject: 'Not assigned to me',
|
||||
type: type,
|
||||
author: user,
|
||||
assigned_to: other_user
|
||||
|
||||
@@ -140,7 +140,7 @@ describe 'My page', type: :feature, js: true do
|
||||
|
||||
sleep(0.3)
|
||||
|
||||
# Resizing leads to the calender area now spanning a larger area
|
||||
# Resizing leads to the calendar area now spanning a larger area
|
||||
calendar_area.expect_to_span(1, 1, 3, 2)
|
||||
# Because of the added row, and the resizing the other widgets (assigned and created) have moved down
|
||||
assigned_area.expect_to_span(3, 1, 4, 2)
|
||||
|
||||
@@ -96,4 +96,4 @@ The config is divided into groups. A group can have a height property which will
|
||||
|
||||
Any number of rows can be defined. The font_size and minimum_lines properties define how much height on the card is given to the row. The plugin will attempt to assign enough space to each of the rows, however space will be assigned based on the priorities of the the rows, with rows with lower priority (higher numbers) being reduced and removed first if there is not enough for all the data. The row height can be forced by giving a value, in pixels, for the row height property. This will override the assigned row height.
|
||||
|
||||
The name of the column informs the plugin which data should be read from the model (status, due_date, id, etc.). There can be any number of columns per row. Custom field names can also be used. Columns are given an equal share of the row width unless a specific width % is given. If there is more text in the column than can fit into its assinged space on the card then the text will be truncated.
|
||||
The name of the column informs the plugin which data should be read from the model (status, due_date, id, etc.). There can be any number of columns per row. Custom field names can also be used. Columns are given an equal share of the row width unless a specific width % is given. If there is more text in the column than can fit into its assigned space on the card then the text will be truncated.
|
||||
|
||||
@@ -37,8 +37,8 @@ en:
|
||||
label_export_card_configuration_plural: "Export Card Configs"
|
||||
label_export_card_activate: "Activate"
|
||||
label_export_card_deactivate: "De-activate"
|
||||
notice_export_card_configuration_activated: "Config succesfully activated"
|
||||
notice_export_card_configuration_deactivated: "Config succesfully de-activated"
|
||||
notice_export_card_configuration_activated: "Config successfully activated"
|
||||
notice_export_card_configuration_deactivated: "Config successfully de-activated"
|
||||
error_can_not_activate_export_card_configuration: "This config cannot be activated"
|
||||
error_can_not_deactivate_export_card_configuration: "This config cannot be de-activated"
|
||||
validation_error_required_keys_not_present: "Required key(s) not present:"
|
||||
|
||||
@@ -73,11 +73,11 @@ describe "export card configurations Admin", type: :feature, js: true do
|
||||
# DEACTIVATE
|
||||
SeleniumHubWaiter.wait
|
||||
page.first('a', text: 'De-activate').click
|
||||
expect(page).to have_text 'Config succesfully de-activated'
|
||||
expect(page).to have_text 'Config successfully de-activated'
|
||||
|
||||
# ACTIVATE
|
||||
SeleniumHubWaiter.wait
|
||||
page.first('a', text: 'Activate').click
|
||||
expect(page).to have_text 'Config succesfully activated'
|
||||
expect(page).to have_text 'Config successfully activated'
|
||||
end
|
||||
end
|
||||
|
||||
@@ -112,7 +112,7 @@ describe ::TwoFactorAuthentication::TokenService, with_2fa_ee: true do
|
||||
end
|
||||
end
|
||||
|
||||
context 'with overriden device' do
|
||||
context 'with overridden device' do
|
||||
let(:use_device) { sms_device }
|
||||
it 'uses the overridden device' do
|
||||
expect(subject.requires_token?).to be_truthy
|
||||
|
||||
@@ -40,7 +40,7 @@ module OpenProject::XlsExport
|
||||
end
|
||||
end
|
||||
|
||||
# Update column widths and wrap text if neccessary
|
||||
# Update column widths and wrap text if necessary
|
||||
def update_sheet_widths
|
||||
@column_widths.count.times do |idx|
|
||||
if @column_widths[idx] > 60
|
||||
|
||||
+1
-1
@@ -100,7 +100,7 @@ describe XlsExport::WorkPackage::Exporter::XLS do
|
||||
it 'produces the correct result' do
|
||||
expect(query.columns.map(&:name)).to eq %i[type id subject status assigned_to priority]
|
||||
|
||||
# the first header row devides the sheet into work packages and relation columns
|
||||
# the first header row divides the sheet into work packages and relation columns
|
||||
expect(sheet.rows.first.take(8)).to eq ['Work packages', nil, nil, nil, nil, nil, nil, 'Relations']
|
||||
|
||||
# the second header row includes the column names for work packages and relations and the related work package
|
||||
|
||||
@@ -239,7 +239,7 @@ describe WorkPackagesController, type: :controller do
|
||||
let(:call_action) { get('index', params: params.merge(format: 'pdf')) }
|
||||
let(:params) { { query_id: 'hokusbogus' } }
|
||||
|
||||
context 'when a non-existant query has been previously selected' do
|
||||
context 'when a non-existent query has been previously selected' do
|
||||
before do
|
||||
allow(User.current).to receive(:allowed_to?).and_return(true)
|
||||
|
||||
|
||||
@@ -91,12 +91,12 @@ describe Query, type: :model do
|
||||
|
||||
describe 'highlighting' do
|
||||
context 'with EE' do
|
||||
it '#hightlighted_attrirbutes accepts valid values' do
|
||||
it '#highlighted_attributes accepts valid values' do
|
||||
query.highlighted_attributes = %w(status priority due_date)
|
||||
expect(query).to be_valid
|
||||
end
|
||||
|
||||
it '#hightlighted_attributes rejects invalid values' do
|
||||
it '#highlighted_attributes rejects invalid values' do
|
||||
query.highlighted_attributes = %w(status bogus)
|
||||
expect(query).not_to be_valid
|
||||
end
|
||||
|
||||
@@ -121,7 +121,7 @@ describe Version, type: :model do
|
||||
assert_progress_equal 100.0 / 3, v.closed_percent
|
||||
end
|
||||
|
||||
it 'should progress should consider estimated hours to weigth issues' do
|
||||
it 'should progress should consider estimated hours to weight issues' do
|
||||
project = Project.find(1)
|
||||
(v = Version.new.tap do |v|
|
||||
v.attributes = { project: project, name: 'Progress' }
|
||||
@@ -134,7 +134,7 @@ describe Version, type: :model do
|
||||
assert_progress_equal 25.0 / 95.0 * 100, v.closed_percent
|
||||
end
|
||||
|
||||
it 'should progress should consider average estimated hours to weigth unestimated issues' do
|
||||
it 'should progress should consider average estimated hours to weight unestimated issues' do
|
||||
project = Project.find(1)
|
||||
(v = Version.new.tap do |v|
|
||||
v.attributes = { project: project, name: 'Progress' }
|
||||
|
||||
Reference in New Issue
Block a user