Initial commit
This commit is contained in:
25
spec/helpers/project_client_helper_spec.rb
Normal file
25
spec/helpers/project_client_helper_spec.rb
Normal file
@@ -0,0 +1,25 @@
|
||||
require "rails_helper"
|
||||
|
||||
RSpec.describe ProjectClientHelper, type: :helper do
|
||||
describe "selected_project_client_value" do
|
||||
context "when project having predefined client" do
|
||||
let(:project) { create(:project, :nat_geo_client) }
|
||||
|
||||
subject { helper.selected_project_client_value(project) }
|
||||
|
||||
it "returns correct value" do
|
||||
expect(subject).to match "nat_geo"
|
||||
end
|
||||
end
|
||||
|
||||
context "when project having other client" do
|
||||
let(:project) { create(:project) }
|
||||
|
||||
subject { helper.selected_project_client_value(project) }
|
||||
|
||||
it "returns correct value" do
|
||||
expect(subject).to match "other"
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user