updates the sp responsible_name when creating/editing a sp

This commit is contained in:
kikito
2016-04-06 19:23:05 +02:00
parent 3c8416e863
commit 32a60515c6
2 changed files with 14 additions and 0 deletions

View File

@@ -261,4 +261,12 @@ describe SpendingProposal do
end
end
describe "responsible_name" do
it "gets updated with the user name" do
u = create(:user, username: "manolo")
sp = create(:spending_proposal, author: u)
expect(sp.responsible_name).to eq("manolo")
end
end
end