GithubHelp home page GithubHelp logo

Comments (3)

benjamin-rood avatar benjamin-rood commented on June 16, 2024 1

@bestwebua Can you assign this to me? I will have time on this weekend to do it.

from go-smtp-mock.

bestwebua avatar bestwebua commented on June 16, 2024 1

Good catch, @benjamin-rood 👍 Seems like good point to add one more file, handler_test.go with one test for handler#clearError() method:

go-smtp-mock/handler.go

Lines 13 to 15 in 34c709d

func (handler *handler) clearError() {
handler.session.clearError()
}

Just one straightforward test with sessionMock about checking of clearError() calling. Also we have indirect calls of this one therefore we have 100% coverage for this case.

Screenshot 2022-11-17 at 18 01 07

from go-smtp-mock.

bestwebua avatar bestwebua commented on June 16, 2024

Seems we have test for this case:

func TestHandlerClearError(t *testing.T) {
t.Run("erases session error", func(t *testing.T) {
session := &session{err: errors.New("some error")}
handler := &handler{configuration: createConfiguration(), session: session}
handler.clearError()
assert.Nil(t, session.err)
})
}

@benjamin-rood We don't need tests for this method, it's my bad, sorry. But if you want, you can try to fix this issue: #135

from go-smtp-mock.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.