diff --git a/config/locales/de.yml b/config/locales/de.yml index 5bda3ffc78..0de5a57f24 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -4,6 +4,7 @@ de: attributes: cost_entry: issue: "Ticket" + work_package: "Ticket" overridden_costs: "Überschriebene Kosten" spent: "Gebucht" spent_on: "Datum" diff --git a/config/locales/en.yml b/config/locales/en.yml index b5704a9da0..d68647f9b3 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -4,6 +4,7 @@ en: attributes: cost_entry: issue: "Issue" + work_package: "Issue" overridden_costs: "Overridden costs" spent: "Spent" spent_on: "Date" diff --git a/spec/controllers/costlog_controller_spec.rb b/spec/controllers/costlog_controller_spec.rb index 15d6f4eec3..f5fc767137 100644 --- a/spec/controllers/costlog_controller_spec.rb +++ b/spec/controllers/costlog_controller_spec.rb @@ -2,12 +2,12 @@ require File.expand_path(File.dirname(__FILE__) + "/../spec_helper.rb") describe CostlogController do include Cost::PluginSpecHelper - let (:project) { FactoryGirl.build(:project_with_trackers) } - let (:issue) { FactoryGirl.build(:issue, :project => project, + let (:project) { FactoryGirl.create(:project_with_trackers) } + let (:issue) { FactoryGirl.create(:issue, :project => project, :author => user, :tracker => project.trackers.first) } - let (:user) { FactoryGirl.build(:user) } - let (:user2) { FactoryGirl.build(:user) } + let (:user) { FactoryGirl.create(:user) } + let (:user2) { FactoryGirl.create(:user) } let (:controller) { FactoryGirl.build(:role, :permissions => [:log_costs, :edit_cost_entries]) } let (:cost_type) { FactoryGirl.build(:cost_type) } let (:cost_entry) { FactoryGirl.build(:cost_entry, :work_package => issue, @@ -44,22 +44,14 @@ describe CostlogController do end before do - # removing db entries added by fixtures - # TODO: remove fixtures - CostType.destroy_all - CostEntry.destroy_all - Project.destroy_all - User.destroy_all - Rate.destroy_all - - user.save! - project.save! - #issue_status - issue.save! if issue disable_flash_sweep @controller.stub!(:check_if_login_required) end + after do + User.current = nil + end + describe "GET new" do let(:params) { { "work_package_id" => issue.id.to_s } }