diff options
Diffstat (limited to 'spec/services/issues/update_service_spec.rb')
-rw-r--r-- | spec/services/issues/update_service_spec.rb | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/spec/services/issues/update_service_spec.rb b/spec/services/issues/update_service_spec.rb new file mode 100644 index 00000000000..9bfc0f674de --- /dev/null +++ b/spec/services/issues/update_service_spec.rb @@ -0,0 +1,24 @@ +require 'spec_helper' + +describe Issues::UpdateService do + let(:project) { create(:empty_project) } + let(:user) { create(:user) } + let(:issue) { create(:issue) } + + describe :execute do + context "valid params" do + before do + project.team << [user, :master] + opts = { + title: 'New title', + description: 'Also please fix' + } + + @issue = Issues::UpdateService.new(project, user, opts).execute(issue) + end + + it { @issue.should be_valid } + it { @issue.title.should == 'New title' } + end + end +end |